Skip to content

constraint.NetIsCIDR

marrow16 edited this page Oct 22, 2022 · 4 revisions

Prev Home Next

Constraint: NetIsCIDR

Description

Check that string value is a valid CIDR (v4 or v6) address

V8n Tag Abbreviation

isCIDR

Fields

Field Type Description
V4Only bool if set, allows only CIDR v4
V6Only bool if set, allows only CIDR v6
DisallowLoopback bool if set, disallows loopback addresses
DisallowPrivate bool if set, disallows private addresses
Message string the violation message to be used if the constraint fails. If empty, the default message is used
Stop bool when set to true, Stop prevents further validation checks on the property if this constraint fails

Note: Setting both V4Only and V6Only to true will cause this constraint to always fail!

Examples

Clone this wiki locally