Server side form validating numbers

A few months ago Sandeep introduced us to the HTML Constraint API, showing how we can use the new HTML5 input types and attributes to validate our forms in the browser with minimal Java Script.Today I’m going to walk you through validating a simple booking form by using the Constraint API, and keep an eye on how you can make sure your forms stay accessible too.

All credit cards are 16 digits and the 16th digit can be calculated based on the first 15 numbers.

By default, the plugin doesn't re-validate a field once it is already validated and marked as a valid one.

When using with other plugins, the field value is changed and therefore need to be re-validated.

Although there is nothing terribly complex about the above process, it usually requires a significant amount of code, and to display error messages, various control structures are usually placed within the form HTML.

Form validation, while simple to create, is generally very messy and tedious to implement.

Leave a Reply

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

One thought on “server side form validating numbers”

  1. She's also known to socialize in celebrity circles. my buddy's step sister makes 73 per hour on the internet. the previous month her revenue was 15009 just working on the internet for 5 hours a day...