Laravel

Laravel form validation

Laravel form validation

Hi, Here I am going to explain simple laravel form validation. How validation takes part in laravel application. It’s just a basic example for beginners who needs just a basics in laravel validation.

My File are :

form.blade => view

FormController.php => Controller

routes.php => Which containing routing controls.

routes.php

http://yourdomain.com/form => It will come to routes.php and redirect to FormController.php -> form function

FormController.php

The form function will take you into form.bade inside view folder.

form.blade

Once you submit the form It takes you to FormController.php -> save function.



My FormController.php

 

To get your error message in your form.blade, something like.

You can check laravel validation rules @ http://laravel.com/docs/4.2/validation

That’s it. Enjoy with laravel validation.

If you like this article don’t forget to share and comment.