Hi everybody,
Where I have to register my own validator, when I want to also seed some data during plugin instalation? Now I'm getting error:
Method [validateSomething] does not exist. where something is my custom validation rule.
I'm registering validator at Plugin.php boot method like that:
public function boot() {
Validator::resolver(function($translator, $data, $rules, $messages, $customAttributes) {
return new CustomValidator($translator, $data, $rules, $messages, $customAttributes);
});
}
When I seed database manually, everythings works fine, include validations. I tried to register validator directly at seeder, but didn't help.
Any ideas?
Last updated