IsNullValidator

class IsNullValidator extends ConstraintValidator Constants PRETTY_DATE Whether to format {@link \DateTime} objects as RFC-3339 dates ("Y-m-d H:i:s"). OBJECT_TO_STRING Whether to cast objects with a "__toString()" method to strings. Methods initialize(ExecutionContextInterface $context) Initializes the constraint validator. from ConstraintValidator validate(mixed $value, Constraint $constraint) Checks if the passed value is valid. Details initia

IsNull

class IsNull extends Constraint Constants DEFAULT_GROUP The name of the group given to all constraints with no explicit group. CLASS_CONSTRAINT Marks a constraint that can be put onto classes. PROPERTY_CONSTRAINT Marks a constraint that can be put onto properties. NOT_NULL_ERROR Properties mixed $payload Domain-specific data attached to a constraint. from Constraint array $groups The groups that the constraint belongs to from Constraint $message Methods static string

IsFalseValidator

class IsFalseValidator extends ConstraintValidator Constants PRETTY_DATE Whether to format {@link \DateTime} objects as RFC-3339 dates ("Y-m-d H:i:s"). OBJECT_TO_STRING Whether to cast objects with a "__toString()" method to strings. Methods initialize(ExecutionContextInterface $context) Initializes the constraint validator. from ConstraintValidator validate(mixed $value, Constraint $constraint) Checks if the passed value is valid. Details initi

IsFalse

class IsFalse extends Constraint Constants DEFAULT_GROUP The name of the group given to all constraints with no explicit group. CLASS_CONSTRAINT Marks a constraint that can be put onto classes. PROPERTY_CONSTRAINT Marks a constraint that can be put onto properties. NOT_FALSE_ERROR Properties mixed $payload Domain-specific data attached to a constraint. from Constraint array $groups The groups that the constraint belongs to from Constraint $message Methods static stri

IsbnValidator

class IsbnValidator extends ConstraintValidator Validates whether the value is a valid ISBN-10 or ISBN-13. Constants PRETTY_DATE Whether to format {@link \DateTime} objects as RFC-3339 dates ("Y-m-d H:i:s"). OBJECT_TO_STRING Whether to cast objects with a "__toString()" method to strings. Methods initialize(ExecutionContextInterface $context) Initializes the constraint validator. from ConstraintValidator validate(mixed $value, Constraint $constraint) Checks if the passed valu

Isbn

class Isbn extends Constraint Constants DEFAULT_GROUP The name of the group given to all constraints with no explicit group. CLASS_CONSTRAINT Marks a constraint that can be put onto classes. PROPERTY_CONSTRAINT Marks a constraint that can be put onto properties. TOO_SHORT_ERROR TOO_LONG_ERROR INVALID_CHARACTERS_ERROR CHECKSUM_FAILED_ERROR TYPE_NOT_RECOGNIZED_ERROR Properties mixed $payload Domain-specific data attached to a constraint. from Constraint array

IpValidator

class IpValidator extends ConstraintValidator Validates whether a value is a valid IP address. Constants PRETTY_DATE Whether to format {@link \DateTime} objects as RFC-3339 dates ("Y-m-d H:i:s"). OBJECT_TO_STRING Whether to cast objects with a "__toString()" method to strings. Methods initialize(ExecutionContextInterface $context) Initializes the constraint validator. from ConstraintValidator validate(mixed $value, Constraint $constraint) Checks if the passed value is valid.

IpUtils::checkIp6()

static bool checkIp6(string $requestIp, string $ip) Compares two IPv6 addresses. In case a subnet is given, it checks if it contains the request IP. Parameters string $requestIp IPv6 address to check string $ip IPv6 address or subnet in CIDR notation Return Value bool Whether the IP is valid Exceptions RuntimeException When IPV6 support is not enabled See also https://github.com/dsp/v6tools

IpUtils::checkIp4()

static bool checkIp4(string $requestIp, string $ip) Compares two IPv4 addresses. In case a subnet is given, it checks if it contains the request IP. Parameters string $requestIp IPv4 address to check string $ip IPv4 address or subnet in CIDR notation Return Value bool Whether the request IP matches the IP, or whether the request IP is within the CIDR subnet

IpUtils::checkIp()

static bool checkIp(string $requestIp, string|array $ips) Checks if an IPv4 or IPv6 address is contained in the list of given IPs or subnets. Parameters string $requestIp IP to check string|array $ips List of IPs or subnets (can be a string if only a single one) Return Value bool Whether the IP is valid