Skip to content

constraint.NetIsIP

marrow16 edited this page Oct 22, 2022 · 4 revisions

Prev Home Next

Constraint: NetIsIP

Description

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

V8n Tag Abbreviation

isIP

Fields

Field Type Description
V4Only bool if set, allows only IP v4
V6Only bool if set, allows only IP v6
Resolvable bool if set, checks that the address is resolvable
DisallowLoopback bool if set, disallows loopback addresses
DisallowPrivate bool if set, disallows private addresses
AllowLocalhost bool if set, allows value of "localhost" to be seen as valid
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