LARAVEL | VALIDATING DATA PART 2 | IMPLEMENTING VALIDATION IN LARAVEL

Опубликовано: 17 Март 2026
на канале: Chirag Rachchh
47
5

This video is part 2 of implementing Validation in Laravel.
In the previous session(video) I have shown how to use Laravel's validate method and how to do manual validation using Validator object.
In this video, I have shown using Form Request to validate data.
Using Form Request we can define common rules for multiple requests that share common behavior.
Moreover, I have used place holder attribute to show the old data entered by the client, instead we should use value attribute and set it to the value of laravel helper old() so that the old data will be placed correctly.



So if you try the code explained by me in this video, just replace the input element's definition where you want to show old data with the following


<input type="text" class="form-control" id="firstname" value="{{old('firstname')}}" placeholder="First Name" name="firstname">