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);
            }
        }
    }