Lewati ke konten
PHP Ecosystem
Explore

yii\validators

Konten ini belum tersedia dalam bahasa Anda.

API reference › yii › validators

NamespaceTypes
yii\validators\client1
ClassSummary
BooleanValidatorBooleanValidator checks if the attribute value is a boolean value.
CompareValidatorCompareValidator compares the specified attribute value with another value.
DateValidatorDateValidator verifies if the attribute represents a date, time or datetime in a proper $format.
DefaultValueValidatorDefaultValueValidator sets the attribute to be the specified default value.
EachValidatorEachValidator validates an array by checking each of its elements against an embedded validation rule.
EmailValidatorEmailValidator validates that the attribute value is a valid email address.
ExistValidatorExistValidator validates that the attribute value exists in a table.
FileValidatorFileValidator verifies if an attribute is receiving a valid uploaded file.
FilterValidatorFilterValidator converts the attribute value according to a filter.
ImageValidatorImageValidator verifies if an attribute is receiving a valid image.
InlineValidatorInlineValidator represents a validator which is defined as a method in the object being validated.
IpValidatorThe validator checks if the attribute value is a valid IPv4/IPv6 address or subnet.
NumberValidatorNumberValidator validates that the attribute value is a number.
PunycodeAssetThis asset bundle provides the javascript files needed for the EmailValidators client validation.
RangeValidatorRangeValidator validates that the attribute value is among a list of values.
RegularExpressionValidatorRegularExpressionValidator validates that the attribute value matches the specified $pattern.
RequiredValidatorRequiredValidator validates that the specified attribute does not have null or empty value.
SafeValidatorSafeValidator serves as a dummy validator whose main purpose is to mark the attributes to be safe for massive assignment.
StringValidatorStringValidator validates that the attribute value is of certain length.
TrimValidatorThis class converts the attribute value(s) to string(s) and strip characters.
UniqueValidatorUniqueValidator validates that the attribute value is unique in the specified database table.
UrlValidatorUrlValidator validates that the attribute value is a valid http or https URL.
ValidationAssetThis asset bundle provides the javascript files for client validation.
ValidatorValidator is the base class for all validators.