Esempio n. 1
0
 protected function validate(Validator $v)
 {
     $v->whenSet(function (Validator $v) {
         $v->notDateTime('The value is not a valid Date and Time string');
     });
     return parent::validate($v);
 }
Esempio n. 2
0
 protected function validate(Validator $v)
 {
     $v->whenNotNull(function (Validator $v) {
         $v->allow(function (Validator $v) {
             $v->notInt('The value is not a valid UNIX-TimeStamp');
         })->allow(function (Validator $v) {
             $v->notDateTime('The value is not a valid Date and Time string');
         })->notPassed('The value is not a valid Date and/or Time');
     });
 }