HTML and CSS Reference
In-Depth Information
Validation
Validation is often a crucial issue on the web, both for security and for
general smooth operation of apps, but it's something that content
authors frequently get wrong. HTML5 has built-in form-validation fea-
tures. In this section, we'll look at how you can specify that filling in
certain fields is required, delimit numeric inputs with maximum and
minimum values, and define arbitrary format requirements for any
other text field with regular expressions. We'll then examine how these
features interact with CSS and JavaScript to allow you to give useful
feedback to your users.
If you're accepting input from users
through forms, there should always be
validation going on at the server. But
it provides a better experience to let
users know they've made mistakes
immediately rather than to let them fill
out the whole form, submit, wait for a
response, and only then find out they
made a mistake.
Required
Min/Max
Pattern
5
5
5
4
4
4
10
10
10
9
9
9
5
5
5
 
Search WWH ::




Custom Search