/** * Short description of method __construct * * @access public * @author Joel Bout, <*****@*****.**> * @param array options * @return mixed */ public function __construct($options = array()) { parent::__construct($options); if (isset($this->options['uri'])) { $this->message = __("Code already used"); } }
/** * Short description of method __construct * * @access public * @author Joel Bout, <*****@*****.**> * @param array options * @return mixed */ public function __construct($options = array()) { parent::__construct($options); if (!isset($this->options['format'])) { throw new Exception("Please set the format options (define your regular expression)!"); } $this->message = __('The format of this field is not valid.'); }
/** * Short description of method __construct * * @access public * @author Joel Bout, <*****@*****.**> * @param array options * @return mixed */ public function __construct($options = array()) { parent::__construct($options); $this->message = __('Invalid file type!'); if (!isset($this->options['mimetype'])) { throw new common_Exception("Please define the mimetype option for the FileMimeType Validator"); } }
/** * Short description of method __construct * * @access public * @author Joel Bout, <*****@*****.**> * @param array options * @return mixed */ public function __construct($options = array()) { parent::__construct($options); if (isset($this->options['message'])) { $this->message = $this->options['message']; } if (!isset($this->options['function']) && !((isset($this->options['class']) || isset($this->options['object'])) && isset($this->options['method']))) { throw new Exception("Please define a callback function or method"); } }
/** * Short description of method __construct * * @access public * @author Joel Bout, <*****@*****.**> * * @param array $options * * @param string $name * * @throws Exception */ public function __construct(array $options = array(), $name = '') { parent::__construct($options); if (!isset($this->options['format'])) { throw new Exception("Please set the format options (define your regular expression)!"); } $this->message = array_key_exists('message', $this->options) ? $this->options['message'] : __('The format of this field is not valid.'); if (is_string($name) && $name) { $this->name = $name; } else { $this->name = str_replace('tao_helpers_form_validators_', '', get_class($this)); } }
/** * Short description of method __construct * * @access public * @author Joel Bout, <*****@*****.**> * @param array options * @return mixed */ public function __construct($options = array()) { parent::__construct($options); if (!isset($this->options['reference']) || !$this->options['reference'] instanceof tao_helpers_form_FormElement) { throw new common_Exception("No FormElement provided as reference for Equals validator"); } $reference = $this->options['reference']; if (isset($this->options['invert']) && $this->options['invert']) { $this->message = __('This should not equal ') . $reference->getDescription(); } else { $this->message = __('This should equal ') . $reference->getDescription(); } }
/** * Short description of method __construct * * @access public * @author Joel Bout, <*****@*****.**> * @param array options * @return mixed */ public function __construct($options) { parent::__construct($options); if (isset($this->options['min']) && isset($this->options['max'])) { $this->message = __('Invalid file size') . " (minimum " . $this->options['min'] . " octets, maximum " . $this->options['max'] . " octets)"; } else { if (!isset($this->options['min']) && isset($this->options['max'])) { $this->options['min'] = 0; $this->message = __('The uploaded file is too large') . " (maximum " . $this->options['max'] . " octets)"; } else { throw new common_Exception("Please set 'min' and/or 'max' options!"); } } }
/** * Short description of method __construct * * @access public * @author Joel Bout, <*****@*****.**> * @param array options * @return mixed */ public function __construct($options = array()) { parent::__construct($options); if (isset($this->options['min']) && isset($this->options['max'])) { $this->message = __('Invalid field length') . " (minimum " . $this->options['min'] . ", maximum " . $this->options['max'] . ")"; } else { if (isset($this->options['min']) && !isset($this->options['max'])) { $this->message = __('This field is too short') . " (minimum " . $this->options['min'] . ")"; } else { if (!isset($this->options['min']) && isset($this->options['max'])) { $this->message = __('This field is too long') . " (maximum " . $this->options['max'] . ")"; } else { throw new Exception("Please set 'min' and/or 'max' options!"); } } } }
/** * Short description of method __construct * * @access public * @author Bertrand Chevrier, <*****@*****.**> * @param array options * @return mixed */ public function __construct(array $options = array()) { parent::__construct($options); }
/** * Short description of method __construct * * @access public * @author Joel Bout, <*****@*****.**> * @param array options * @return mixed */ public function __construct($options = array()) { parent::__construct($options); $this->message = __('Passwords are not matching'); }
/** * Short description of method __construct * * @access public * @author Joel Bout, <*****@*****.**> * @param array options * @return mixed */ public function __construct($options = array()) { parent::__construct($options); isset($options['message']) ? $this->message = $options['message'] : ($this->message = __('This field is required')); }
/** * Short description of method __construct * * @access public * @author Joel Bout, <*****@*****.**> * @param array $options * @return mixed */ public function __construct($options = array()) { parent::__construct($options); isset($options['message']) ? $this->message = $options['message'] : ($this->message = __('Entity with such field already present')); }
/** * Setup email validator * * @access public * @author Aleh Hutnikau <*****@*****.**> * @param array Validator options * @return void */ public function __construct($options = array()) { parent::__construct($options); isset($options['message']) ? $this->message = $options['message'] : ($this->message = __('This is not a valid email address.')); }