Bummer! This is just a preview. You need to be signed in with an account to view the entire instruction.

Well done!

You have completed (UPI) Chapter 10: Utilizing Forms with JavaScript!

Instruction

Constraining the Length of Your Entries

You can constrain the character length of all text fields created by <input> or <textarea> by using the minlength and maxlength attributes. A field is invalid if it has a value and that value has fewer characters than the minlength value or more than the maxlength value.

Browsers often don't let the user type a longer value than expected into text fields. A better user experience than ju...