Laravel 8 tutorial - Form Validation

  Рет қаралды 84,823

Code Step By Step

Code Step By Step

3 жыл бұрын

in this laravel 8 and laravel 9 video tutorial, how to apply validation on HTML form and and show error message Laravel 8ther version. This video is made by anil Sidhu in the English language
steps of video
Use Validation function
Show error message
Error with every field
Interview Question for form validate
laravel 9 complete playlist
• Laravel 8 tutorial

Пікірлер: 77
@codestepbystep
@codestepbystep 2 жыл бұрын
Please support me by Subscribe, Like and Comment :) Thank you
@hamzaarham8746
@hamzaarham8746 Жыл бұрын
Sir i dont have lang folder in resources.............i've searched on google and chat-gpt but i found nothing...........please lead me to fix it.
@meghanahiregoudar7830
@meghanahiregoudar7830 3 жыл бұрын
The answer for your interview question: use "old()" helper in value attribute of input tag. eg: value= " {{old ('name of filed') }} "
@TechPurush-2023
@TechPurush-2023 3 жыл бұрын
Thanks.
@TechPurush-2023
@TechPurush-2023 3 жыл бұрын
But old does not work with password field, obviously bcos it's hidden.
@darn2926
@darn2926 2 жыл бұрын
Thanks it worked
@AnonyMous-rj2te
@AnonyMous-rj2te 3 жыл бұрын
its better to use html inbuilt validation but ya i can say your englsih playlist is better than that hindi one love from pakistan
@rohitprabhakar4217
@rohitprabhakar4217 3 жыл бұрын
A CSRF token is a unique, secret, unpredictable value that is generated by the server-side application and transmitted to the client in such a way that it is included in a subsequent HTTP request made by the client. Mainly used to make sure that nobody should be hack in without the a CSRF and is generally generated using pseudo-random number generator and is transmitted security is important between server and client in this case.
@shohagkhan3677
@shohagkhan3677 3 жыл бұрын
Your way of teaching is awesome. Hope, it will be a complete series. I hope you will show how to send and receive various types of data using Axios in Laravel.
@mohammadazzam5265
@mohammadazzam5265 3 жыл бұрын
I loved your explanation well explained and nicely giving the information waiting for a series on Codeigniter 4, please thank you very much, sir
@kaziovesh9798
@kaziovesh9798 3 жыл бұрын
We use csrf token for security purposes like.. Laravel makes easy to protect your application from cross-site request forgery (csrf) attacks.......csrf token secure your application from attacker.. AM i right sir?
@mohammedhusain6446
@mohammedhusain6446 3 жыл бұрын
What is meant by cross site request, can you explain plz.
@finegap
@finegap 2 жыл бұрын
@@mohammedhusain6446 Cross-Site Request Forgery (CSRF) is an attack that forces an end user to execute unwanted actions on a web application
@madibfarhan
@madibfarhan 3 жыл бұрын
I like the way you explain it because easy to understand. Hope you will continue to make more videos ! I always support you
@014amine
@014amine 3 жыл бұрын
Laravel automatically generates a CSRF "token" for each active user session managed by the application. This token is used to verify that the authenticated user is the person actually making the requests to the application.
@ashokbishwas
@ashokbishwas Жыл бұрын
A CSRF token is a secure random token (e.g., synchronizer token or challenge token) that is used to prevent CSRF attacks. The token needs to be unique per user session and should be of large random value to make it difficult to guess. A CSRF secure application assigns a unique CSRF token for every user session
@aamirkhanmaarofi9705
@aamirkhanmaarofi9705 3 жыл бұрын
Use value="{{old('nameOfTheElement')}}" in order to remember the value of field even when the validation fails.
@AmitKumarSingh-dy3pf
@AmitKumarSingh-dy3pf 3 жыл бұрын
but how to make it print on input text ....mai jab bhi esko paste kar raha hoon vo input text box k side mai print ho rha h any solution?
@dianaeftaiha
@dianaeftaiha 3 жыл бұрын
@@AmitKumarSingh-dy3pf
@negi3625
@negi3625 3 жыл бұрын
@@dianaeftaiha thanks
@GhulamAbbas-qf6xl
@GhulamAbbas-qf6xl 3 жыл бұрын
thank u so much sir
@alexandref3991
@alexandref3991 3 жыл бұрын
Hi there! In the validation you validate the filelds but can i get a specified one like $req->username, can i do something like this? nice vid btw
@MonirulIslam-sg7oh
@MonirulIslam-sg7oh 2 жыл бұрын
Nice video. Can you show the how the old data can be back?
@gyamfijohn3066
@gyamfijohn3066 5 ай бұрын
reason for adding @crsf to your form is ; Laravel's CSRF protection mechanism helps prevent CSRF attacks by generating a unique CSRF token for each user session. This token is added as a hidden field in every form generated by Laravel using the @csrf directive. When the form is submitted, Laravel verifies that the CSRF token matches the one stored in the user's session. If the tokens don't match, Laravel will reject the request, preventing potential CSRF attacks.
@mhsmartgaming2708
@mhsmartgaming2708 2 жыл бұрын
Then when the form does not pass the validation I need to show the old input, so that user does not loose what he has already input. So I need to have a way to display old data like: value="{{old('title')}}"
@JasvirSingh-fd6fp
@JasvirSingh-fd6fp 3 жыл бұрын
thanks sir.
@super-legend
@super-legend 3 жыл бұрын
Csrf token is used for preventing violation of cors policy
@freetimespot7218
@freetimespot7218 3 жыл бұрын
Can u pls explain a little more for those don't know anything. . Regarding the @errors , @if what all are? Is that laravel syntax for if and errors
@lyawileh.a8741
@lyawileh.a8741 2 жыл бұрын
blade template syntax
@erriada-com
@erriada-com Жыл бұрын
thanks 👍👍👍
@ullangisarvothamaraju996
@ullangisarvothamaraju996 2 жыл бұрын
very nice sir
@webdev723
@webdev723 3 жыл бұрын
I am learning
@TherealEmemay
@TherealEmemay 2 жыл бұрын
Thank youu
@rajansnuriya
@rajansnuriya 2 жыл бұрын
@NurulIslam-dw8yp
@NurulIslam-dw8yp 3 жыл бұрын
Thanks but why don't you teach everything from the documents and only few of them?
@eslamabdallah3131
@eslamabdallah3131 3 жыл бұрын
when I try to make a validation on update it takes the same values for the insert, but I wanna make them different validation!
@graham11545
@graham11545 Жыл бұрын
not sure what is the question?
@domingo9037
@domingo9037 Жыл бұрын
Why I keep getting error like this syntax error, unexpected '=>' (T_DOUBLE_ARROW) on the validation
@MajidKhan-lh9cl
@MajidKhan-lh9cl 3 жыл бұрын
How to return validation error without resetting form? because if you have a form with multiple fields a single validation error will reset the whole form.
@csstudies1393
@csstudies1393 3 жыл бұрын
gd question
@aliraza9511
@aliraza9511 3 жыл бұрын
you will have to use the attribute on input field which is onChange event -> you will pass the validation method to this event. so on every change in input field -> validation method will get called and it will return you error as you type....
@rahulgarnayak9400
@rahulgarnayak9400 2 жыл бұрын
Broda , I have few doubts, 1. What is all() and any()?? 2. All of sudden you are declaring $message , Whats the use of that , Whether it is predefined ?
@flyingfox4262
@flyingfox4262 Жыл бұрын
These r the predefined methods of errors class, if u know object-oriented form thn u can understand
@sengwatrongrat1630
@sengwatrongrat1630 2 жыл бұрын
Hello Sir and every body , I have a doubt , what is the any() function ?
@graham11545
@graham11545 Жыл бұрын
ok so $errors returns an erorr object and the method any returns a boolean if there is any error
@arvindegiz
@arvindegiz Жыл бұрын
Undefined variable $massage
@jeevanstha57
@jeevanstha57 2 жыл бұрын
How to store form data with validation...
@SiriReddy-2282
@SiriReddy-2282 9 ай бұрын
for cross rquest for another page
@parthkalariya2113
@parthkalariya2113 2 жыл бұрын
hello sir, sir how can we set validation on email ? sir help me fast as possible
@graham11545
@graham11545 Жыл бұрын
check out regex
@karticmalhotra8150
@karticmalhotra8150 Жыл бұрын
its showing error that message variable is not defined
@fatemen3764
@fatemen3764 3 жыл бұрын
what is @error ?
@tiziprince
@tiziprince 2 жыл бұрын
I have a big challenge, my errors aren’t displaying, what do I do please?
@graham11545
@graham11545 Жыл бұрын
look over and follow along again with the vidoes again it worled for me
@idrees7861000
@idrees7861000 3 жыл бұрын
How can we customize the $message?
@haiderazad8944
@haiderazad8944 3 жыл бұрын
no this is actually predefined
@sumayaalam1958
@sumayaalam1958 4 ай бұрын
Customize the message in Laravel controller code
@NavdeepSingh-gw6vr
@NavdeepSingh-gw6vr 3 жыл бұрын
Sir redux ki video's ab post ku ni krte sir
@codestepbystep
@codestepbystep 3 жыл бұрын
bhai 1 week me laravel basic complete krte fir bnayege redux pr project
@NavdeepSingh-gw6vr
@NavdeepSingh-gw6vr 3 жыл бұрын
@@codestepbystep ok bro I will be waiting for this
@laughitout9299
@laughitout9299 3 жыл бұрын
@@codestepbystep what about the pattern only text in validation? is it same as pattern="[a-zA-z ]+$" ?
@raghavendrakesari337
@raghavendrakesari337 3 жыл бұрын
database me kaise daale ye to btaya hi nahi
@shivomsharma9409
@shivomsharma9409 2 жыл бұрын
Bhai aapne Hindi class likha hua hai lekin puri video english main nikal di kuch samjh aaya or kuch nhi
@pratikpathak6841
@pratikpathak6841 3 жыл бұрын
this video is not available in your hindi series
@rishabhsharma775
@rishabhsharma775 3 жыл бұрын
I was enjoying your videos and watched till middleware but NOW I realized that it is BAD IDEA to continue on your video...... Becoz you don't teach full points but instead keep hidden important point to ask as interview question. For example, in this- vid you didn't tell how to save input value from reload. You should have told this also in your video but instead you choose to play nonsense of interview question.... If we have to search by ourselves then whats the point of watching your videos. I was watching video to get complete information about laravel, not partial. So I have switched to other youtube channel who gives complete information unlike you. I just feel like to share this with you so if can think about if u wanna keep this way continue in you upcoming vids.
@hamadaziz924
@hamadaziz924 3 жыл бұрын
Same situation....... => could you please share the other YT channel for Laravel Tut. which gave the complete concepts of Laravel Framwork. Appricate that!
@rishabhsharma775
@rishabhsharma775 3 жыл бұрын
@@hamadaziz924 Better and more detailed tutorial I found here kzbin.info/www/bejne/goK8opKCoayImZo
@AKMKawserAhmed
@AKMKawserAhmed 3 жыл бұрын
@@rishabhsharma775 this tutorial really is well descrived
@erriada-com
@erriada-com Жыл бұрын
value="{{Request::old('user_name')}}"
@waseemahmeddin5441
@waseemahmeddin5441 2 жыл бұрын
Undefined variable $message why?
@graham11545
@graham11545 Жыл бұрын
it is defined in its parent class aka Larvel synatx
@mrjay5542
@mrjay5542 2 жыл бұрын
Hindi Hindi Hindi... 😅
@hatimchairi8976
@hatimchairi8976 3 жыл бұрын
Why laravel validation don't displaying errors??
@statusduniya4212
@statusduniya4212 3 жыл бұрын
same bug im getting
@statusduniya4212
@statusduniya4212 3 жыл бұрын
s soon as I moved \Illuminate\Session\Middleware\StartSession::class and \Illuminate\View\Middleware\ShareErrorsFromSession::class from web $middlewareGroups to $middleware in app\Http\Kernel.php everything started working as expected.
@rightbracketethicalhacker1963
@rightbracketethicalhacker1963 2 жыл бұрын
your name😂😂😂😂
Laravel 8 tutorial - What is middleware
9:28
Code Step By Step
Рет қаралды 66 М.
Ajax Form Validation In Laravel In Hindi | Laravel Form Validation Using Ajax
22:21
Mama vs Son vs Daddy 😭🤣
00:13
DADDYSON SHOW
Рет қаралды 47 МЛН
ЧУТЬ НЕ УТОНУЛ #shorts
00:27
Паша Осадчий
Рет қаралды 10 МЛН
Laravel Validation: Required if/with/without
5:14
Laravel Daily
Рет қаралды 12 М.
Laravel 8 tutorial - Submit HTML form
8:10
Code Step By Step
Рет қаралды 73 М.
Form Request | Laravel 10 Tutorial #39
16:56
Yelo Code
Рет қаралды 3,4 М.
Mastering Laravel Form Request Validation: The Ultimate Guide
17:43
Code With ERaufi
Рет қаралды 3,2 М.
Laravel 8 Send Email using SMTP
14:49
Programming with Vishal
Рет қаралды 62 М.