public function __construct(Staple_Form_Element $field = NULL, $strict = false, $usermsg = NULL)
 {
     if (isset($field)) {
         $this->setField($field);
     }
     $this->strict = (bool) $strict;
     parent::__construct($usermsg);
 }
 public function __construct($mimetype = NULL, $usermsg = NULL)
 {
     if (isset($usermsg)) {
         parent::__construct($usermsg);
     }
     if (isset($mimetype)) {
         $this->setMimeCheck($mimetype);
     }
 }
 /**
  * Accepts a maximum length to validate against. Also accepts an optional minimum length.
  * Whenever PHP starts supporting method overloading, the variables will be reversed in
  * order to make more logical sense.
  * 
  * @param int $max
  * @param int $min
  */
 public function __construct($limit1, $limit2 = NULL, $usermsg = NULL)
 {
     $this->min = (int) $limit1;
     if (isset($limit2)) {
         if ($limit2 >= $limit1) {
             $this->max = (int) $limit2;
         } else {
             $this->min = (int) $limit2;
             $this->max = (int) $limit1;
         }
     }
     parent::__construct($usermsg);
 }
Exemple #4
0
 public function __construct($equal, $strict = false, $usermsg = NULL)
 {
     $this->equal = $equal;
     $this->strict = (bool) $strict;
     parent::__construct($usermsg);
 }
 public function __construct($equal, $usermsg = NULL)
 {
     $this->equal = $equal;
     parent::__construct($usermsg);
 }
Exemple #6
0
 /**
  * Constructor sets the regex value to validate against and supports an optional user message.
  * @param string $regex
  * @param string $usermsg
  */
 function __construct($regex, $usermsg = NULL)
 {
     $this->setRegex($regex);
     parent::__construct($usermsg);
 }
 /**
  * Supply an array to the constructor to define valid options.
  * @param array $values
  */
 function __construct(array $values = array(), $usermsg = NULL)
 {
     $this->arrayvalues = $values;
     parent::__construct($usermsg);
 }