Respect validation custom rule errors on exception

795 Views Asked by At

I made an custom rule that checks if the given value equals the password of the user. It works but when i give an wrong password it doesn't display my custom exception message. instead it has an fatal error:

Fatal error: Class 'app\Validation\Exceptions\MatchesPasswordException' not found in C:\xampp\htdocs\phpStorm\gkvrooster\vendor\respect\validation\library\Rules\AbstractRule.php on line 83

I have the files in the right position. Does anyone know why this wouldn't work.

I made a rule for checking if the email is avialble and that works like it should.

1

There are 1 best solutions below

2
On BEST ANSWER

Are you sure you meant to use the namespace "app\Validation\Exceptions"? It sounds to me you would probably want to use either "App\Validation\Exceptions" or "Validation\Exceptions".