/var/www/vhosts/nabawater/vendor/yiisoft/yii2/validators
NameSizeModeActions
BooleanValidator.php30150644editdlrm
CompareValidator.php106530644editdlrm
DateValidator.php191390644editdlrm
DefaultValueValidator.php15220644editdlrm
EachValidator.php64190644editdlrm
EmailValidator.php58210644editdlrm
ExistValidator.php125310644editdlrm
FileValidator.php196700644editdlrm
FilterValidator.php28540644editdlrm
ImageValidator.php74340644editdlrm
InlineValidator.php28530644editdlrm
IpValidator.php197840644editdlrm
NumberValidator.php61460644editdlrm
PunycodeAsset.php5150644editdlrm
RangeValidator.php39240644editdlrm
RegularExpressionValidator.php25220644editdlrm
RequiredValidator.php39340644editdlrm
SafeValidator.php16510644editdlrm
StringValidator.php67220644editdlrm
UniqueValidator.php135250644editdlrm
UrlValidator.php52920644editdlrm
ValidationAsset.php5470644editdlrm
Validator.php201990644editdlrm
Edit: /var/www/vhosts/nabawater/vendor/yiisoft/yii2/validators/InlineValidator.php (2853B)
* @since 2.0 */ class InlineValidator extends Validator { /** * @var string|\Closure an anonymous function or the name of a model class method that will be * called to perform the actual validation. The signature of the method should be like the following: * * ```php * function foo($attribute, $params, $validator) * ``` * * - `$attribute` is the name of the attribute to be validated; * - `$params` contains the value of [[params]] that you specify when declaring the inline validation rule; * - `$validator` is a reference to related [[InlineValidator]] object. This parameter is available since version 2.0.11. */ public $method; /** * @var mixed additional parameters that are passed to the validation method */ public $params; /** * @var string|\Closure an anonymous function or the name of a model class method that returns the client validation code. * The signature of the method should be like the following: * * ```php * function foo($attribute, $params, $validator) * { * return "javascript"; * } * ``` * * where `$attribute` refers to the attribute name to be validated. * * Please refer to [[clientValidateAttribute()]] for details on how to return client validation code. */ public $clientValidate; /** * {@inheritdoc} */ public function validateAttribute($model, $attribute) { $method = $this->method; if (is_string($method)) { $method = [$model, $method]; } call_user_func($method, $attribute, $this->params, $this); } /** * {@inheritdoc} */ public function clientValidateAttribute($model, $attribute, $view) { if ($this->clientValidate !== null) { $method = $this->clientValidate; if (is_string($method)) { $method = [$model, $method]; } return call_user_func($method, $attribute, $this->params, $this); } return null; } }