Thursday 22 May 2014

Give custom validation message in HTML5

Custom Message in HTML5

Generally if you are just giving required in input it will give its own validation message in html5. But if you want to give your custom message then do this.

<input id="UserID" type="text" required="required" oninvalid="this.setCustomValidity('Witinnovation')">

No comments:

Post a Comment