O'Reilly logo

HTML5 Data and Services Cookbook by Mite Mitreski, Gorgi Kosev

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 6. Data Validation

In this chapter, we will cover the following recipes:

  • Validating text by length
  • Validating numbers by range
  • Using the built-in pattern validation
  • Advanced use of built-in constraints and custom validations
  • Calculating password strength
  • Validating US zip codes
  • Using asynchronous server-side validation
  • Combining client-side and server-side validation

Introduction

Forms usually expect the user to behave in a certain way and to insert data as requested. This is where data validations come in. Server-side validation is always a must to do and form validation at the client side should be considered.

Validation makes the application user-friendly, saves time and bandwidth. Client-side and server-side validation complement each other and ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required