Пример #1
0
 /**
  * Brief Description.
  * Complete Description.
  *
  * @param $validator (tipo) desc
  *
  * @returns (tipo) desc
  *
  */
 public function addValidator(MValidator $validator)
 {
     $name = $validator->getField();
     $field = $this->fields->{$name};
     if ($field instanceof MInputControl) {
         if ($validator->isActive()) {
             $field->setValidator($validator);
         }
     }
     return $name;
 }
Пример #2
0
 public static function process($control)
 {
     $mvalidator = new MValidator($control);
     return $mvalidator->processValidators();
 }
Пример #3
0
 public function __construct($field = '', $regexp = '', $message = 'Informe um valor válido.', $required = false)
 {
     parent::__construct($field, $message, $required, $regexp);
 }