Hello Guys , I usaly make custom laravel request like this -
THIS way it works
public function rules()
{
return [
'email' => ['required' , new VerifyIfThisEmailDoesNotExist()] ,
'name' => 'required'
];
}
But I am trying to use many custom classes in just one field , and it is not working . like this -
THIS way dont works
public function rules()
{
return [
'email' => ['required' , new VerifyIfThisEmailDoesNotExist() , new VerifyIfThisEmailisGmailAccount( ) , ] ,
'name' => 'required'
];
}
It is only possible to use one custome class for fields ?
You should be able to pass in multiple custom validation rules.
Do they work separately from each other, when you use them one at a time? In other words: is VerifyIfThisEmailisGmailAccount() working properly?
I also see you have a space passed as an argument to VerifyIfThisEmailisGmailAccount() in the code you posted on the forum. Now this could be a typo while copy/pasting but just to be sure.