Exemple #1
0
 /**
  *
  * @param string $label the field's text label
  * @param string $regex the (pcre) regex used to validate and parse the field
  * @param string $error_msg the message thrown on a regex mismatch
  * @param array $validators a list of callbacks to validate the field data
  * @param array $attributes a list of key/value pairs representing HTML attributes
  */
 public function __construct($label, $regex, $error_msg, array $validators = array(), array $attributes = array())
 {
     parent::__construct($label, 25, 100, $validators, $attributes);
     $this->regex = $regex;
     $this->message = $error_msg;
 }
Exemple #2
0
 /**
  * @param array $validators a list of callbacks to validate the field data
  * @param array $attributes a list of key/value pairs representing HTML attributes
  */
 public function __construct(array $validators = array(), array $attributes = array())
 {
     parent::__construct('', 25, 255, $validators, $attributes);
 }
Exemple #3
0
 /**
  * @param string $label the field's text label
  * @param array $validators a list of callbacks to validate the field data
  * @param array $attributes a list of key/value pairs representing HTML attributes
  */
 public function __construct($label, array $validators = array(), array $attributes = array())
 {
     parent::__construct($label, 25, 100, $validators, $attributes);
 }
Exemple #4
0
 /**
  *
  * @param string $label the field's text label
  * @param int $size the field's size attribute
  * @param int $max_length the maximum size in characters
  * @param callback $hash_function a (string) function or array (instance, string method) callback
  * @param array $validators a list of callbacks to validate the field data
  * @param array $attributes a list of key/value pairs representing HTML attributes
  */
 public function __construct($label, $size, $max_length, $hash_function, array $validators = array(), array $attributes = array())
 {
     $this->hash_function = $hash_function;
     parent::__construct($label, $size, $max_length, $validators, $attributes);
 }