Тёмный

JavaScript Form Validation 

Code with Gvidas
Подписаться 1,5 тыс.
Просмотров 24 тыс.
50% 1

Опубликовано:

 

28 сен 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 24   
@oritsegbemi
@oritsegbemi 2 года назад
for over 4 hours I've been struggling with a long code. thank you so much.
@CodeWithGvidas8534
@CodeWithGvidas8534 2 года назад
You are welcome ;)
@missulu
@missulu Год назад
Only 4 hours? Not a programmer are you!lol!
@deleajayii
@deleajayii Год назад
Thanks for the video, but how do I validate for "email" field?
@shareefzada2106
@shareefzada2106 Год назад
can you tell me as a beginner how much JavaScript i should learn? for example i do know about addEventListener, but here the syntax is a bit different Hope you understood my question
@CodeWithGvidas8534
@CodeWithGvidas8534 Год назад
As a beginner, you should focus on learning the basics of JavaScript syntax, including variables, data types, control structures, functions, and objects. Once you have a solid understanding of these fundamentals, you can start learning more advanced topics like DOM manipulation, AJAX, and frameworks like React or Angular. Don't be afraid to experiment and practice coding on your own. Building small projects and tinkering with code is one of the best ways to learn and improve your skills as a JavaScript developer.
@shareefzada2106
@shareefzada2106 Год назад
@@CodeWithGvidas8534 Thank you man..! means a lot
@rakeshmuthyala4229
@rakeshmuthyala4229 Год назад
Nice videos. Really helpful
@CodeWithGvidas8534
@CodeWithGvidas8534 Год назад
Thanks! Thanks for watching!
@aribakhan7322
@aribakhan7322 Год назад
can you tell me how to add regex here? I added, but it didn't work, I don't know not why. It worked first then don't work any more
@CodeWithGvidas8534
@CodeWithGvidas8534 Год назад
Hi, it is difficult to say without seeing your code, but one of the ways to implement regex check would be: const form = document.querySelector("#form"); const input = document.querySelector("#phone"); const output = document.querySelector("#output"); const re = /^(?:\d{3}|\(\d{3}\))([-/.])\d{3}\1\d{4}$/; function testInfo(phoneInput) { const ok = re.exec(phoneInput.value); output.textContent = ok ? `Thanks, your phone number is ${ok[0]}` : `${phoneInput.value} isn't a phone number with area code!`; } form.addEventListener("submit", (event) => { event.preventDefault(); testInfo(input); });
@ayikoandrew4680
@ayikoandrew4680 Год назад
Thank you so much for this work sir.
@CodeWithGvidas8534
@CodeWithGvidas8534 Год назад
Thank you for watching Ayiko 🙂
@nrazuke
@nrazuke 2 года назад
how do you change the push message color??
@CodeWithGvidas8534
@CodeWithGvidas8534 Год назад
In this tutorial for the messages element is used, which is styled in stylesheet
@nrazuke
@nrazuke Год назад
@@CodeWithGvidas8534 thanks!
@fiddletomiko
@fiddletomiko Год назад
I have this problem crbug/1173575, non-JS module files deprecated, instead showing of these error it goes directly to my files
@CodeWithGvidas8534
@CodeWithGvidas8534 Год назад
I highly suggest you to google the error and try to find the solution to this error. Also you could try (if you are using chrome) go into the Network tab of the Chrome Developer Console and make sure that the connection is on No throttling and not Offline.
@seppneimusser5723
@seppneimusser5723 Год назад
Wow°° Thank you for your tutorial and help!
@CodeWithGvidas8534
@CodeWithGvidas8534 Год назад
Thank you for watching and finding it helpful! :)
@m.j.mcintear793
@m.j.mcintear793 Год назад
how to call the function with each of these variables as an argument emailaddress variable and emailconfirm variables Do you know how to make two of the same emails need to match and is that client side validation or server side? Inquiry of js on html form
@CodeWithGvidas8534
@CodeWithGvidas8534 Год назад
First of all you need to create two more input fields, lets say with id's "email" and the other - "emailConfirm". Then you need to add two constants in script.js file: const email= document.getElementById("email"); const emailConfirm= document.getElementById("emailConfirm"); And finally add additional check in submit eventListener function: if(email.value.trim() !== emailConfirm.value.trim()){ errors.push("Wrong email") } This is front-end(client side) validation. If you want to learn more about front-end and the back-end you can watch my video: ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-eRD3Bgk0iEk.html
@edwinchigozie215
@edwinchigozie215 Год назад
Bro source code, damn
@CodeWithGvidas8534
@CodeWithGvidas8534 Год назад
github.com/GvidasGVD/jsFormValidation
Далее
JavaScript Client-side Form Validation
29:07
Просмотров 715 тыс.
The BEST way to do form validation in JavaScript
59:45
React Hook Form - Complete Tutorial (with Zod)
28:22
Просмотров 116 тыс.
JavaScript Form Validation For Beginners
16:37
Просмотров 28 тыс.
JavaScript Form Validation
6:39
Просмотров 901 тыс.
Login Form Validation | HTML CSS & Javascript
21:10
Просмотров 21 тыс.