public function validate($value)
 {
     $value = TE\String($value);
     $pattern = '/[\\p{А-Яа-яЁё}]+/g';
     if (preg_match($pattern, $value->value())) {
         return true;
     }
     return false;
 }
Beispiel #2
0
 public function validate($value)
 {
     $value = TE\String($value);
     $pattern = '/^(\\(?(\\d{3})\\)?\\s?-?\\s?(\\d{3})\\s?-?\\s?(\\d{4}))$/gm';
     if (preg_match($pattern, $value)) {
         return true;
     }
     return false;
 }
Beispiel #3
0
 public function validate($value)
 {
     $value = TE\String($value);
     $pattern = '/[\\p{A-Za-z\\s0-9\\-\\+\\=\\.\\,}]+/g';
     if (preg_match($pattern, $value->value())) {
         return true;
     }
     return false;
 }
 public function validate($value)
 {
     $value = TE\String($value);
     $pattern = '/^\\d{4}[\\s\\-]?\\d{4}[\\s\\-]?\\d{4}[\\s\\-]?\\d{4}$/g';
     if (preg_match($pattern, $value)) {
         return true;
     }
     return false;
 }
Beispiel #5
0
 public function validate($value)
 {
     $value = TE\String($value);
     $range = is_array($this->__get('_params')['range']) ? $this->__get('_params')['range'] : array($this->__get('_params')['range']);
     return in_array($value, $range);
 }