Example #1
0
 protected function validate(Validator $v)
 {
     $v->whenSet(function (Validator $v) {
         $v->smallerThan(1, 1, 'The value needs to be exatly one character long');
     });
     return parent::validate($v);
 }