Ejemplo n.º 1
0
 function validate()
 {
     parent::validate();
     if ($this->value != '' and $this->maxlength > 0) {
         $this->form->validator->email($this->field);
     }
 }
Ejemplo n.º 2
0
 function validate()
 {
     parent::validate();
     $strlen = strlen($this->value);
     if ($strlen > 0) {
         if (!preg_match("/^[0-9]{" . $strlen . "}\$/", $this->value)) {
             $this->form->validator->setError($this->field, 902);
         }
     }
 }
Ejemplo n.º 3
0
 function validate()
 {
     parent::validate();
     $strlen = strlen($this->value);
     if ($strlen > 0) {
         if (!preg_match('|^http(s)?://[a-z0-9-]+(.[a-z0-9-]+)*(:[0-9]+)?(/.*)?$|i', $this->value)) {
             $this->form->validator->setError($this->field, 912);
         }
     }
 }