/**
  * Ensure that the ID attribute is rendered and registers the javascript code
  * for initializing the active control.
  */
 protected function addAttributesToRender($writer)
 {
     parent::addAttributesToRender($writer);
     TBaseValidator::registerClientScriptValidator();
 }
Ejemplo n.º 2
0
 /**
  * Only register the client-side validator if
  * {@link setClientValidationFunction ClientValidationFunction} is set.
  */
 protected function registerClientScriptValidator()
 {
     if ($this->getClientValidationFunction() !== '') {
         parent::registerClientScriptValidator();
     }
 }