It seems the minlength attribute for an <input> field doesn’t work.
Is there any other attribute in HTML with the help of which I can set the minimal length of a value for fields?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You can use the
patternattribute. Therequiredattribute is also needed, otherwise an input field with an empty value will be excluded from constraint validation.If you want to create the option to use the pattern for “empty, or minimum length”, you could do the following: