Symfony\Component\Validator\Constraints\Ip
Validates that a value is a valid IP address
- Author: Bernhard Schussek <bschussek@gmail.com>
Synopsis
class Ip
extends Constraint
{
- // constants
- const V4 = '4';
- const V6 = '6';
- const ALL = 'all';
- const V4_NO_PRIV = '4_no_priv';
- const V6_NO_PRIV = '6_no_priv';
- const ALL_NO_PRIV = 'all_no_priv';
- const V4_NO_RES = '4_no_res';
- const V6_NO_RES = '6_no_res';
- const ALL_NO_RES = 'all_no_res';
- const V4_ONLY_PUBLIC = '4_public';
- const V6_ONLY_PUBLIC = '6_public';
- const ALL_ONLY_PUBLIC = 'all_public';
- // Inherited constants from Constraint
- const DEFAULT_GROUP = 'Default';
- const CLASS_CONSTRAINT = 'class';
- const PROPERTY_CONSTRAINT = 'property';
- // Inherited members from Constraint
- public array $groups;
- // methods
- public void __construct()
- // Inherited methods from Constraint
- public void __construct()
- public void __set()
- public void addImplicitGroupName()
- public string getDefaultOption()
- public array getRequiredOptions()
- public string validatedBy()
- public string|array getTargets()
Hierarchy
Constants
Name | Value |
---|---|
V4 | '4' |
V6 | '6' |
ALL | 'all' |
V4_NO_PRIV | '4_no_priv' |
V6_NO_PRIV | '6_no_priv' |
ALL_NO_PRIV | 'all_no_priv' |
V4_NO_RES | '4_no_res' |
V6_NO_RES | '6_no_res' |
ALL_NO_RES | 'all_no_res' |
V4_ONLY_PUBLIC | '4_public' |
V6_ONLY_PUBLIC | '6_public' |
ALL_ONLY_PUBLIC | 'all_public' |
DEFAULT_GROUP | 'Default' |
CLASS_CONSTRAINT | 'class' |
PROPERTY_CONSTRAINT | 'property' |
Members
protected
- $versions
public
- $groups — array
- $message
- $version
Methods
Inherited from Symfony\Component\Validator\Constraint
public
- __set() — Unsupported operation.
- addImplicitGroupName() — Adds the given group if this constraint is in the Default group
- getDefaultOption() — Returns the name of the default option
- getRequiredOptions() — Returns the name of the required options
- getTargets() — Returns whether the constraint can be put onto classes, properties or both
- validatedBy() — Returns the name of the class that validates this constraint