If no minlength is specified, or an invalid value is specified, the input has no minimum length. Examples: HTML program to illustrate how to sets the minlength property. This must be an integer value 0 or higher. And you can! How to set input type date in dd-mm-yyyy format using HTML ? @Mahoor13 I have written it similar to that, but it never validates. Syntax: <Textarea minlength="numeric"> Attribute Value: number: It contains the numeric value i.e 0 or higher. This must be an integer value 0 or higher. https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/minlength, https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/minlength. html5 form validation needs modern browsers see this page: better to use "onkeyup" instead of "onchange" to see effectively if the input is valid or not. To prevent the validator from displaying errors before the user has a chance to edit the form, you should check for either the dirty or touched states in a control. If 1st point can be done, so Is there a way to create some property files and set in that files custom error messages? This has the following problem (at least in Chrome 55) : when the invalid message pops , if the user keeps focus in the invalid field (without clicking) and edits the field the message keeps poping out - even when the field is valid - it's necessary to either focus out or trigger submit. When the user changes the value in the watched field, the control is marked as "dirty" How can my Beastmaster ranger use its animal companion as a mount? But as with all things HTML5, reliability depends upon the browser. The setCustomValidity let you change the default validation message.Here is a simple exmaple of how to use it. How can I change an element's class with JavaScript? There are messages for required, minlength, and forbiddenName. It means the value entered in text input must be of 5 characters minimum. When the migration is complete, you will access your Teams at stackoverflowteams.com, and they will no longer appear in the left sidebar on stackoverflow.com. So, if you have a wide IE11 user base, consider using the pattern HTML5 attribute that is supported almost across the board in most browsers (including IE11). How can I change HTML 5 form validation errors default messages? It specifies the minimum number of characters that have been allowed in the Element. You can also reverse this to make it display the character count remaining up to the maxlength of the targeted field. How can I set the default value for an HTML or