Form Validation Flashcards
Validation
The concept of checking user provided data against the required data
Server-Side Validation
Validation where data is sent to another machine (usually a server) and is processed there. This type of validation is usually used for usernames and pass codes,
Client-Side Validation
Validation that occurs before the data is sent to the server and the information is checked on the browser (the client)
What does the <em>required</em> attribute do?
Makes a forum input required, and it will not allow the forum to be submitted unless it is filled out.
Where does the <em>required</em> attribute go?
In the <strong>input</strong> element
What do the <em>min</em> and <em>max</em> attributes do?
Make it so that in a numbers or range type form, the user cannot submit it unless the number is in that range.
Where do the <em>min</em> and <em>max</em> attributes go?
In the <strong>input</strong> element
What do the <em>minlength</em> and <em>maxlength</em> attributes do?
They make the forum input have a maximum or minimum amount of characters
What does the <em>pattern</em> attribute do?
Checks how the text was provided - for example it can limit it to only be letters a-z