How can i validate the inputs ?
i don't want this to happen, because it is awful so can anybody help me fix this ?
code :
https://pastebin.com/NrVx2s9g
Pastebin
function addRow() { let name = document.getElementById("name").val...
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
![No description](https://cdn.answeroverflow.com/1216766215280922634/image.png)
8 Replies
What do you want to validate ? can you elaborate
sii i've created a user, but i dont want this to happen
only when i add informations to the inputs add a user
but not to be empty and add an empty user
start with html validation
then in the backend have it return back if blank with w/e msg telling the user. If they somehow injected it not using the html form.
it's easier the other way around, otherwise you have to mess with the form just to get it to submit invalid data
I mean html fist no? its how I role anyway.
simple
required
attrib and brrrrrrrr
wanna add a little more use pattern=""
? 😄I write it in stages, more basic functionality first than any language first
so html, then some css, backend, then JS to talk to it, and then back to enhance everything
i added the required attrib but didnt even work a lil fr
when you have to apply required attribute in your input tag, all input tags must be placed within form tag.
so that validation works well.