Is HTML 5 validation useful?

JavascriptWeb DevelopmentFront End Scripts

Yes, HTML5 validation is useful and useful to validate forms as well. Now you do not need to have JavaScript for client-side validations like empty text box would never be submitted because HTML5 introduced a new attribute called required.

Let us see an example −

      <form action = "/cgi-bin/html5.cgi" method = "get">
         Enter email : <input type = "text" name = "newinput" required/>
         <p>Try to submit using Submit button</p>
         <input type = "submit" value = "submit" />
Published on 05-Apr-2018 13:24:41