PHP yii\validators Namespace

Classes

Name Description
BooleanValidator BooleanValidator checks if the attribute value is a boolean value.
CompareValidator CompareValidator compares the specified attribute value with another value.
DateValidator DateValidator verifies if the attribute represents a date, time or datetime in a proper [[format]].
DefaultValueValidator DefaultValueValidator sets the attribute to be the specified default value.
EachValidator EachValidator validates an array by checking each of its elements against an embedded validation rule.
EmailValidator EmailValidator validates that the attribute value is a valid email address.
ExistValidator ExistValidator validates that the attribute value exists in a table.
FileValidator FileValidator verifies if an attribute is receiving a valid uploaded file.
FilterValidator FilterValidator converts the attribute value according to a filter.
ImageValidator ImageValidator verifies if an attribute is receiving a valid image.
IpValidator The validator checks if the attribute value is a valid IPv4/IPv6 address or subnet.
NumberValidator NumberValidator validates that the attribute value is a number.
RangeValidator RangeValidator validates that the attribute value is among a list of values.
RegularExpressionValidator RegularExpressionValidator validates that the attribute value matches the specified [[pattern]].
RequiredValidator RequiredValidator validates that the specified attribute does not have null or empty value.
SafeValidator SafeValidator serves as a dummy validator whose main purpose is to mark the attributes to be safe for massive assignment.
StringValidator StringValidator validates that the attribute value is of certain length.
UniqueValidator UniqueValidator validates that the attribute value is unique in the specified database table.
UrlValidator UrlValidator validates that the attribute value is a valid http or https URL.
Validator Validator is the base class for all validators.