Class CRegularExpressionValidator
CRegularExpressionValidator validates that the attribute value matches to the
specified pattern regular expression. You may invert the validation
logic with help of the CRegularExpressionValidator::$not
property (available since 1.1.5).
- CComponent
- CValidator
- CRegularExpressionValidator
Copyright: 2008-2013 Yii Software LLC
License: http://www.yiiframework.com/license/
Author: Qiang Xue <qiang.xue@gmail.com>
Since: 1.0
Located at x2engine/framework/validators/CRegularExpressionValidator.php
protected
|
#
validateAttribute(
Validates the attribute of the object. If there is any error, the error message is added to the object. |
public
string
|
#
clientValidateAttribute(
Returns the JavaScript needed for performing client-side validation. |
addError(),
applyTo(),
createValidator(),
isEmpty(),
validate()
|
public
string
|
$pattern |
|
#
the regular expression to be matched with |
public
boolean
|
$allowEmpty | true |
#
whether the attribute value can be null or empty. Defaults to true, meaning that if the attribute is empty, it is considered valid. |
public
boolean
|
$not | false |
#
whether to invert the validation logic. Defaults to false. If set to true,
the regular expression defined via |
$attributes,
$builtInValidators,
$enableClientValidation,
$except,
$message,
$on,
$safe,
$skipOnError
|