Monday, May 22, 2017

New request created with php artisan, always returns invalid response in ajax in laravel

I've created a new request with php artisan command. When I send my form to be validated with laravel built-in request in ajax, it will return the response of validation correctly, however when I send it and want to validate it with the new request created with php artisan earlier, it returns all inputs invalid, but if I set the rules in an array in the controller and use it there, it works correctly.

How can I fix that?

Thanks



via simpleCoder

Advertisement