/** * 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; }
public static function process($control) { $mvalidator = new MValidator($control); return $mvalidator->processValidators(); }
public function __construct($field = '', $regexp = '', $message = 'Informe um valor válido.', $required = false) { parent::__construct($field, $message, $required, $regexp); }