src/widgets/ActiveFormClientScript.php
protected function buildClientValidator($validator, $model, $attribute, $view)
    {
        foreach ($this->getClientValidatorMap() as $serverSideValidatorClass => $clientSideValidator) {
            if ($clientSideValidator !== false && $validator instanceof $serverSideValidatorClass) {
                /* @var $clientValidator \yii\validators\client\ClientValidator */
                $clientValidator = $this->app->createObject($clientSideValidator);

                return $clientValidator->build($validator, $model, $attribute, $view);
            }
        }
    }
protected function buildClientValidator($validator, $model, $attribute, $view)
    {
        foreach ($this->getClientValidatorMap() as $serverSideValidatorClass => $clientSideValidator) {
            if ($clientSideValidator !== false && $validator instanceof $serverSideValidatorClass) {
                /* @var $clientValidator \yii\validators\client\ClientValidator */
                $clientValidator = $this->app->createObject($clientSideValidator);

                return $clientValidator->build($validator, $model, $attribute, $view);
            }
        }
    }
protected function buildClientValidator ( $ validator , $ model , $ attribute , $ view ) { foreach ( $ this -> getClientValidatorMap ( ) as $ serverSideValidatorClass => $ clientSideValidator ) { if ( $ clientSideValidator !== false && $ validator instanceof $ serverSideValidatorClass ) { /* @var $clientValidator \yii\validators\client\ClientValidator */ $ clientValidator = $ this -> app -> createObject ( $ clientSideValidator ) ; return $ clientValidator -> build ( $ validator , $ model , $ attribute , $ view ) ; } } }
Builds the JavaScript needed for performing client-side validation for given validator.

@param \yii\validators\Validator $validator validator to be built.
@param \yii\base\Model           $model     the data model being validated.
@param string                    $attribute the name of the attribute to be validated.
@param \yii\view\View            $view      the view object that is going to be used to render views or view files
containing a model form with validator applied.

@return string|null client-side validation JavaScript code, `null` - if given validator is not supported.
Builds the JavaScript needed for performing client - side validation for given validator .