Below is the complete list of predefined validator aliases:
boolean: alias of CBooleanValidator, ensuring the attribute has a value that is either CBooleanValidator::trueValue or CBooleanValidator::falseValue.
boolean
captcha: alias of CCaptchaValidator, ensuring the attribute is equal to the verification code displayed in a CAPTCHA.
captcha
compare: alias of CCompareValidator, ensuring the attribute is equal to another attribute or constant.
compare
email: alias of CEmailValidator, ensuring the attribute is a valid email address.
email
date: alias of CDateValidator, ensuring the attribute represents a valid date, time, or datetime value.
date
default: alias of CDefaultValueValidator, assigning a default value to the specified attributes.
default
exist: alias of CExistValidator, ensuring the attribute value can be found in the specified table column.
exist
file: alias of CFileValidator, ensuring the attribute contains the name of an uploaded file.
file
filter: alias of CFilterValidator, transforming the attribute with a filter.
filter
in: alias of CRangeValidator, ensuring the data is among a pre-specified list of values.
in
length: alias of CStringValidator, ensuring the length of the data is within certain range.
length
match: alias of CRegularExpressionValidator, ensuring the data matches a regular expression.
match
numerical: alias of CNumberValidator, ensuring the data is a valid number.
numerical
required: alias of CRequiredValidator, ensuring the attribute is not empty.
required
type: alias of CTypeValidator, ensuring the attribute is of specific data type.
type
unique: alias of CUniqueValidator, ensuring the data is unique in a database table column.
unique
url: alias of CUrlValidator, ensuring the data is a valid URL.
url
Source: http://www.yiiframework.com/doc/guide/1.1/en/form.model
Your email address will not be published. Required fields are marked *
Comment *
Name *
Email *
Website
Save my name, email, and website in this browser for the next time I comment.
Δ