Is there an HTML5 attribute to set the maximum amount of characters in a textarea or other form?
I want a yes/no answer not some other method using javascript.
Is there an HTML5 attribute to set the maximum amount of characters in a
Share
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.
Yup, maxlength works still: http://jsfiddle.net/xhqsB/1/ (demo has textarea and input type of text)
Beware that it is fairly easy for the client to bypass these restrictions, so if you are submitting data to a form, have the server-side script check the length of the submitted data.