Validating a web form

According to Can IUse, Safari 9.1 still has about half as much usage as Safari 10.0, and older versions of i OS Safari are still used at rates that can’t be ignored by most web applications.But form validation is a bit unique when it comes to browser features, and this wait may not be as big of a deal as it first appears.You can apply a handful of attributes and get functionality that used to require a non-trivial amount of Java Script.And that simplicity is important, because the majority of forms on the web are nothing more than a user-friendly way to interact with some server-side API.As I’m writing this, thousands of developers and designers are debating whether their error messages should appear above their inputs, alongside them, in tooltips, or whether they should use some other approach altogether.It’s a shame that we’re all still building custom solutions to this problem rather than collectively using something built into the browser.Although form validation has landed in Safari’s Technology Preview, it’ll be some time before the feature ships as part of a stable release.Safari has traditionally done yearly releases that coincide with i OS and mac OS updates, but they have given signs that they intend to ship more frequently.



But this common workflow poses a question that has plagued developers for years: where do you put your form’s validation logic? Robust client-side validation cannot prevent bad, invalid, or dangerous data from reaching your backend.But I think cross-browser form validation has a chance to change this.


Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>