Form validation with JavaScript (on user registration form)

แชร์
ฝัง
  • เผยแพร่เมื่อ 24 ก.ย. 2024
  • Using JavaScript, the input fields of the registration page are validated individually. Form submitting is prevented if all the form validation rules are not fulfilled.
    Styled error messages are displayed underneath each field and the user is prompted to re-enter the correct value.
    To learn how to insert in the database, check out this video:
    • Inserting and retrievi...

ความคิดเห็น • 150

  • @MicheleJolie
    @MicheleJolie 7 ปีที่แล้ว +45

    i spend the first few minutes trying to figure out what was wrong with your sound.

    • @alexserafini24
      @alexserafini24 6 ปีที่แล้ว +7

      I spent 10 minutes troubleshooting like 3 times thinking the audio card broke. Pissed off for nothing

    • @Ganesh_T_Gani
      @Ganesh_T_Gani 5 ปีที่แล้ว +1

      hahaahha same here

    • @noumansyed5809
      @noumansyed5809 4 ปีที่แล้ว +1

      hahah

    • @SanDex-V-Felix
      @SanDex-V-Felix 4 ปีที่แล้ว

      😂

  •  2 ปีที่แล้ว

    thanks for the simple teaching yet very understandable you make it easy to learn for us new beginners in programming.

  • @INSIGHT_OFFICIAL_VID
    @INSIGHT_OFFICIAL_VID 6 ปีที่แล้ว

    Amazing!!! but i recommend that you should not using php, you just creat a new file and name it .html and that it because you can write a lot of code in html like javascript, php, css.

  • @kprakash9665
    @kprakash9665 2 ปีที่แล้ว

    Please do a video all these along with checkboxes select and radio date as well

  • @harishboggavarapu5375
    @harishboggavarapu5375 7 ปีที่แล้ว +7

    Can u do it with out using php?

  • @steveg917
    @steveg917 4 ปีที่แล้ว +4

    lol why do you copy code from google?

    • @AwaMelvine
      @AwaMelvine  4 ปีที่แล้ว +1

      Can you kindly provide the link to the code you saw on Google?

    • @steveg917
      @steveg917 4 ปีที่แล้ว +1

      @@AwaMelvine yes hehe xD
      codewithawa.com/posts/form-validation-with-javascript

    • @AwaMelvine
      @AwaMelvine  4 ปีที่แล้ว

      @@steveg917 Okay. That is my website. I wrote the article.

    • @steveg917
      @steveg917 4 ปีที่แล้ว

      @@AwaMelvine ho ok xD

  • @johnsonbenjamin464
    @johnsonbenjamin464 7 ปีที่แล้ว +31

    nice tutorial but it would have been nicer if you were talking.

    • @johnbritolima
      @johnbritolima 7 ปีที่แล้ว +4

      Man, I have my doubts about it.
      I mean... maybe he isn't a talking guy. And fair point to silent tutorials: they almost always cut right to the chase.

  • @manodlakchanwijayarathne4488
    @manodlakchanwijayarathne4488 6 ปีที่แล้ว

    Thank you. It worked perfectly. Do more tutorials with sound!

  • @kausamvypal9287
    @kausamvypal9287 3 ปีที่แล้ว

    this code is submitting the data, but the output is not showing

  • @mememoons
    @mememoons 6 ปีที่แล้ว

    I got it and It's working, thanks for the great tutorial

  • @vaishnavialuru1787
    @vaishnavialuru1787 5 ปีที่แล้ว +2

    Bro plz don't make soundless videos 😅 but yes it was good and would have been best with sound

  • @kiprotichkosgey5464
    @kiprotichkosgey5464 7 ปีที่แล้ว

    what is the role of that index .php?
    I thought the form action="register.php"> (the form should be directed to register.php not index.php)

  • @T4atf
    @T4atf 7 ปีที่แล้ว

    Thanks for this. Excellent tutorial!!!

  • @pytechsolutions5589
    @pytechsolutions5589 7 ปีที่แล้ว

    ERROR: Uncaught TypeError: name[0].addEventListener is not a function
    at line
    name.addEventListener("blur", nameVerify, true);
    where
    var name = document.forms["generalForm"]["name"];
    I need help for this error

  • @goodlucksamson4416
    @goodlucksamson4416 4 ปีที่แล้ว

    I have tried validating my form several times but its continusly showing uncought error

  • @Kwame_Kwao
    @Kwame_Kwao 7 ปีที่แล้ว

    this is soo great thanks for sharing your knowledge,
    God bless you and i also do appreciate it soo much!!!

  • @Dexter101x
    @Dexter101x 6 ปีที่แล้ว

    Perhaps you could have turned up the audio level a bit, I can't hear you

  • @thestartupguy3975
    @thestartupguy3975 6 ปีที่แล้ว +1

    JUST WHAT IM LOOKIN FOR!!!!!

  • @nocopyrightlover6223
    @nocopyrightlover6223 4 ปีที่แล้ว

    Thank u so much for given source code

  • @prakash655
    @prakash655 5 ปีที่แล้ว

    When I have been entering username . Error message doesn't hide why ???

  • @sumit6350
    @sumit6350 6 ปีที่แล้ว

    Hi I am getting error in my wordpress site The tag 'FORM [method=GET]' requires including the 'amp-form' extension JavaScript.
    Please help me to resolve it I am non techical person

  • @teacherstano
    @teacherstano 7 ปีที่แล้ว

    Great. Its working
    Thankyou

  • @eladdahan4001
    @eladdahan4001 7 ปีที่แล้ว +3

    It ignores the javascript completely
    when I click the submit button it automatically go to the index.php page
    even if I didn't write anything

    • @markkampmann5448
      @markkampmann5448 7 ปีที่แล้ว +1

      Same here. Have you found the problem yet?

    • @giantjack7844
      @giantjack7844 7 ปีที่แล้ว

      Elad Dahan return false;

    • @Yogi-ul3qr
      @Yogi-ul3qr 7 ปีที่แล้ว

      first I had this behaviour also
      then I found the mistake in "var username_error = document.getElementByIds("username_error");" it was the last "s" in getElementByIds

    • @JulioWandekoken
      @JulioWandekoken 6 ปีที่แล้ว

      this is happening here too.

    • @everythingatom6466
      @everythingatom6466 6 ปีที่แล้ว

      i had this problem but now i have fixed if don't add the "onsubmit="validator()"or validate() it will ignore javascript and go straight to the next page
      I HOPE IT WORKS FOR YOU ALL GUYS :)

  • @hasanimam6753
    @hasanimam6753 7 ปีที่แล้ว

    thank you for javascript validation

  • @ПетърКолев-и5е
    @ПетърКолев-и5е 7 ปีที่แล้ว

    Great video, mate! Thanks :)

  • @andikasw10
    @andikasw10 4 ปีที่แล้ว

    thanks bro, this video a lot of much help me

  • @mdjabedbhuiyan
    @mdjabedbhuiyan 7 ปีที่แล้ว

    Thanks to you for create such this tutorial, please create a pos management tutorial by php and mysqli.

  • @everythingatom6466
    @everythingatom6466 6 ปีที่แล้ว

    it really helped me out man in validating my form that i made.
    VERY HAPPY :)

  • @aliazizadeh7103
    @aliazizadeh7103 4 ปีที่แล้ว

    thanks bro for help me about validate form ...

  • @raymond1489
    @raymond1489 7 ปีที่แล้ว

    This text under the forms doesn't looks beautifully. I'd have replaced it under the Register into a separate div

  • @vigneshkannan970
    @vigneshkannan970 7 ปีที่แล้ว

    super bro congrats! u can post a complete one business purpose to create a website using html and css , javascript , jquery only pls dont using boostrap

    • @TejpalNakul
      @TejpalNakul 7 ปีที่แล้ว +1

      Vignesh kumar website can be by using html,css,javaScript,jQuery but without bootstrap it will be not look nice so for responsiveness and correct padding and margin bootstrap is important to use .

    • @batballworld5938
      @batballworld5938 7 ปีที่แล้ว

      Agree @kusti classes without bootstrap you can't make website. coz responsivnes is very necessary and that's can be done only with the help of bootstrap.

  • @prakash655
    @prakash655 5 ปีที่แล้ว

    Wow this is so helpful for me thanks sir

  • @PiSLASH
    @PiSLASH 7 ปีที่แล้ว +1

    Good Job 👏👏 Thanks Man

  • @airelsplanet8404
    @airelsplanet8404 5 ปีที่แล้ว

    where is index.php?

  • @marquee_1292
    @marquee_1292 3 ปีที่แล้ว

    hello am marquee and I think this is the best work bravo .....how will get started upto your level

    • @marquee_1292
      @marquee_1292 3 ปีที่แล้ว

      and with sound it could be more better

  • @MsElsospechoso28
    @MsElsospechoso28 7 ปีที่แล้ว

    Is it just me or this video doesn't have audio at all?

  • @TheShadowSuave
    @TheShadowSuave 7 ปีที่แล้ว +1

    any way of having the error show with an invalid email instead of just blank? trying to figure this out any advice would be great :)

  • @dimitrijejovanovic6779
    @dimitrijejovanovic6779 6 ปีที่แล้ว

    Why in password validation You didnt put password_confirm?

  • @b.tazeem
    @b.tazeem 4 ปีที่แล้ว

    i saved your complete code but authentication is not working for me

    • @AwaMelvine
      @AwaMelvine  4 ปีที่แล้ว

      This video focuses mainly on validating with Javascript. If you want to implement authentication, you can try following this other video: th-cam.com/video/8K4Wt37Itc4/w-d-xo.html

  • @sandoxs
    @sandoxs 5 ปีที่แล้ว

    code did not work!

  • @DungNguyen-jx4lr
    @DungNguyen-jx4lr 3 ปีที่แล้ว

    No sound!

  • @kannadaskillhub
    @kannadaskillhub 5 ปีที่แล้ว

    So we have to click everytime submit to validate each field.
    This might be very hard for users if we have large number of fields in a form.
    Is there any way to show all the input field errors at once after we click on submit ?
    i need answer for this.

    • @zephenex4203
      @zephenex4203 5 ปีที่แล้ว

      You could put an onchange="yourfunctionname()" on every individual input but it would also show the error if you click on the input before you start typing, but i guess there's something like onunfocus="funtion()"

  • @simrangupta9646
    @simrangupta9646 4 ปีที่แล้ว

    i waste my 3 hours on it!!!! username vale vala chl rha baaki email password nhi chl rha !!!! n all the code is same!!

  • @abiyuvan9261
    @abiyuvan9261 5 ปีที่แล้ว

    why they used index.php

  • @mapelalcon2218
    @mapelalcon2218 7 ปีที่แล้ว

    Sir can you give the codes? I try but it doesn't work. Please? Thanks

  • @stackdeveloper6614
    @stackdeveloper6614 6 ปีที่แล้ว

    Form validation with JS or with PHP?? Which one is preferred ?

    • @AwaMelvine
      @AwaMelvine  6 ปีที่แล้ว

      It is good to do both.
      Validating a form with javascript doesn't require the user to reload the page which is good user experience and therefore recommended. However, a user can play tricks on their browser and manage to bypass your javascript validation. If they do, then you will need validation on the server (php) to further validate the user input otherwise your validation is ineffective and you will have to deal with poor or invalid input data.

    • @stackdeveloper6614
      @stackdeveloper6614 6 ปีที่แล้ว

      @@AwaMelvine thankyou for your explanation.

  • @vantu9654
    @vantu9654 5 ปีที่แล้ว

    how to it working with id dynamic?

  • @joshitejas9123
    @joshitejas9123 4 ปีที่แล้ว

    Code not working.

  • @simrangupta9646
    @simrangupta9646 4 ปีที่แล้ว

    or uper se sound bhi ni hai

  • @raksheetkumarkhoriya3915
    @raksheetkumarkhoriya3915 7 ปีที่แล้ว

    Thank you very much. Your video was of really great help to me.

  • @fardayekahmed7878
    @fardayekahmed7878 7 ปีที่แล้ว

    Thanks a lot!

  • @haithemothmane4558
    @haithemothmane4558 8 ปีที่แล้ว

    Thanks that was helpful

  • @masoumehmehrkhah9176
    @masoumehmehrkhah9176 5 ปีที่แล้ว

    thanks, good job!

  • @TheUofastudent
    @TheUofastudent 5 ปีที่แล้ว

    Can u put up videos about the addeventlisteners

  • @killagorilla403
    @killagorilla403 6 ปีที่แล้ว

    So awesome!

  • @medvall9169
    @medvall9169 8 ปีที่แล้ว

    thanks i thimk that what i am needing for

  • @davendersingh215
    @davendersingh215 6 ปีที่แล้ว

    nice lesson

  • @marineoutsource
    @marineoutsource 4 ปีที่แล้ว

    nice if regex is also included ...

  • @alykouyate1022
    @alykouyate1022 7 ปีที่แล้ว +1

    Thank man

  • @elmerpatino2302
    @elmerpatino2302 6 ปีที่แล้ว

    parce no funciona con formularios en ventanas modales

  • @afafbendriouich138
    @afafbendriouich138 5 ปีที่แล้ว

    this code doesnt work at all

  • @vikassuthar9017
    @vikassuthar9017 6 ปีที่แล้ว

    Thank you so much

  • @imaginarytechinhindi5507
    @imaginarytechinhindi5507 7 ปีที่แล้ว +1

    The php not worked it is showing the code in entered

    • @imaginarytechinhindi5507
      @imaginarytechinhindi5507 7 ปีที่แล้ว +1

      easy life sir but in apache and in MySQL server it is also showing me error....

  • @jayeshd8349
    @jayeshd8349 5 ปีที่แล้ว

    It is possible to make jquer validation in asp.net

  • @krishnakumarchinnusamy
    @krishnakumarchinnusamy 7 ปีที่แล้ว

    thanks Sir!

  • @coder5411
    @coder5411 8 ปีที่แล้ว +1

    Thanks Man

    • @AwaMelvine
      @AwaMelvine  8 ปีที่แล้ว

      Thanks for watching

  • @sheezaakbar160
    @sheezaakbar160 6 ปีที่แล้ว

    Thank u sir..

  • @RamRam-po3lq
    @RamRam-po3lq 7 ปีที่แล้ว

    it's working

  • @jaydon.2833
    @jaydon.2833 5 ปีที่แล้ว

    Who else recommended?

  • @sleep1xss794
    @sleep1xss794 5 ปีที่แล้ว

    Bruh, this is straight up HTML5 and JAVASCRIPT.

  • @qaine14
    @qaine14 4 ปีที่แล้ว

    Anyone care to explain the java code for me?

  • @sagunthalajewellers
    @sagunthalajewellers 7 ปีที่แล้ว

    thanks

  • @ZafarIqbal-nz3xb
    @ZafarIqbal-nz3xb 4 ปีที่แล้ว

    For IEMS school app how to login tutorial

  • @fakhryfauzan8677
    @fakhryfauzan8677 7 ปีที่แล้ว

    terima kasih

  • @mranonymusz2168
    @mranonymusz2168 7 ปีที่แล้ว +1

    Thanks :)

    • @AwaMelvine
      @AwaMelvine  7 ปีที่แล้ว +1

      My pleasure :D

    • @mranonymusz2168
      @mranonymusz2168 7 ปีที่แล้ว

      But I have a little bug with it, only Username disapears (Error Message) when I fill the field...

  • @simsim8956
    @simsim8956 7 ปีที่แล้ว

    Your code is NOT working !

    • @TejpalNakul
      @TejpalNakul 7 ปีที่แล้ว

      hey brother it is will work correctly just send me your code what are you doing actually .

  • @kushalbaskey
    @kushalbaskey 7 ปีที่แล้ว

    thanks. please also add your voice

  • @codewithtimzowen
    @codewithtimzowen 4 ปีที่แล้ว

    Good, but no sound, its boring

  • @Sport-word
    @Sport-word 7 ปีที่แล้ว

    nice tutorial
    please can you make a tutorial on html clickable table
    i want if i click the table row, let the data be submitted to my form

  • @mgshaker1838
    @mgshaker1838 7 ปีที่แล้ว

    Thanks for nice this one. I will try to connect with you.

  • @AJITKUMAR-bw6rr
    @AJITKUMAR-bw6rr 7 ปีที่แล้ว

    bilkul bakbas,,,,mere me to ye javascript program run hi nh ho rha h,,jabki mene pura as it copy kiya kiya

  • @sanketparadkar5508
    @sanketparadkar5508 5 ปีที่แล้ว

    Thanks man!

  • @sumitkumarpradhan
    @sumitkumarpradhan 6 ปีที่แล้ว

    simple form validation demo :www.skptricks.com/2018/01/simple-form-validation-in-jquery-using-regular-expression.html

  • @shivaramkrishna6583
    @shivaramkrishna6583 6 ปีที่แล้ว

    Nice one..

  • @leasve7265
    @leasve7265 7 ปีที่แล้ว

    7:10 what kind of witchery is that?

  • @devisatish1936
    @devisatish1936 5 ปีที่แล้ว

    Keep voice explaination

  • @faizurrahuman3930
    @faizurrahuman3930 7 ปีที่แล้ว +1

    username.focus() it means what?

    • @erickorso
      @erickorso 7 ปีที่แล้ว

      el cursor no importa donde esté, vuelve a el input username

    • @susheelyadav6143
      @susheelyadav6143 5 ปีที่แล้ว

      cursor will focus on input field(username).

  • @Substansional
    @Substansional 5 ปีที่แล้ว

    lets say vamoooos

  • @swatibelure1728
    @swatibelure1728 7 ปีที่แล้ว

    its not working

    • @TejpalNakul
      @TejpalNakul 7 ปีที่แล้ว

      it will work just send you code what are you doding actually .

  • @aniruddhakoley2396
    @aniruddhakoley2396 5 ปีที่แล้ว

    view example code
    datainflow.com/password-strength-validation-javascript

  • @sagarghorai8312
    @sagarghorai8312 4 ปีที่แล้ว

    Plz say something

  • @piyushgamit6558
    @piyushgamit6558 5 ปีที่แล้ว +1

    brother dont make sound less video,

  • @mzfriali
    @mzfriali 6 ปีที่แล้ว

    👏👏👏👍

  • @RunOs3
    @RunOs3 6 ปีที่แล้ว

    Might as well be in Mandarin.

  • @zekariastaye5265
    @zekariastaye5265 8 ปีที่แล้ว

    can i get the code bro ?

    • @misssincere5762
      @misssincere5762 8 ปีที่แล้ว

      There a link in the description. Click the link. Download the file. It a zip file unzip the file. once you unzip the file you can either open the file in your browser and click ctrl+U to get the source code or just open the file in note pad etc.

  • @Levelord92
    @Levelord92 6 ปีที่แล้ว

    Hey dude! Your site not working, 404

    • @AwaMelvine
      @AwaMelvine  6 ปีที่แล้ว

      Levelord Thanks for the info man and sorry for the inconvenience. I'm actually upgrading the site. It'll be up in a few minutes

    • @Levelord92
      @Levelord92 6 ปีที่แล้ว

      Oh, glad you didnt abandon it
      yesterday I reviewed your validation function and wanted to improve it, but today *boom* "not avalible"!

  • @zulfafazlee8853
    @zulfafazlee8853 6 ปีที่แล้ว

    sir give me file css

  • @feelbeautifulwithsabnam
    @feelbeautifulwithsabnam 6 ปีที่แล้ว

    Not help full

  • @simrangupta9646
    @simrangupta9646 4 ปีที่แล้ว

    waste of tym

  • @viddictify
    @viddictify 7 ปีที่แล้ว

    3:16 css