I am using confide for user authentication. I wanna use custom rules using laravel's Validator (for firstname and lastname) class as in
$validator = Validator::make($user, $this->rules[$ruleset]);
and check with $validator->passes(). How can I achieve this?
First create your custom validation class. Something like this:
Then register the new validation rules. For example at
bootstrap/start.phpfile add:Then you can use the new rules
firtsnameandlastnamein your models.I hope it works fine for you.