validators\RangeValidator validateValue()

validateValue() protected method Validates a value. A validator class can implement this method to support data validation out of the context of a data model. protected array|null validateValue ( $value )$value mixed The data value to be validated. return array|null The error message and the parameters to be inserted into the error message. Null should be returned if the data is valid. throws yii\base\NotSupportedException if the validator does not supporting data validation withou

validators\RangeValidator validateAttribute()

validateAttribute() public method Validates a single attribute. Child classes must implement this method to provide the actual validation logic. public void validateAttribute ( $model, $attribute )$model yii\base\Model The data model to be validated $attribute string The name of the attribute to be validated.

validators\RangeValidator init()

init() public method Initializes the object. This method is invoked at the end of the constructor after the object is initialized with the given configuration. public void init ( )

validators\RangeValidator clientValidateAttribute()

clientValidateAttribute() public method Returns the JavaScript needed for performing client-side validation. You may override this method to return the JavaScript validation code if the validator can support client-side validation. The following JavaScript variables are predefined and can be used in the validation code: attribute: an object describing the the attribute being validated. value: the value being validated. messages: an array used to hold the validation error messages for the

validators\RangeValidator $strict

$strict public property Whether the comparison is strict (both type and value must be the same) public boolean $strict = false

validators\RangeValidator $range

$range public property A list of valid values that the attribute value should be among or an anonymous function that returns such a list. The signature of the anonymous function should be as follows, function($model, $attribute) { // compute range return $range; } public array|Traversable|Closure $range = null

validators\RangeValidator $not

$not public property Whether to invert the validation logic. Defaults to false. If set to true, the attribute value should NOT be among the list of values defined via $range. public boolean $not = false

validators\RangeValidator $allowArray

$allowArray public property Whether to allow array type attribute. public boolean $allowArray = false

validators\PunycodeAsset $sourcePath

$sourcePath public property public $sourcePath = '@bower/punycode'

validators\PunycodeAsset $js

$js public property public $js = ['punycode.js']