protected function validate(Validator $v) { $v->whenNotNull(function (Validator $v) { $v->notLongerThan(1, 1, 'The value needs to be exatly one character long'); }); }