Client-side validation
Client-side validations can enhance the end user experience by providing an immediate feedback regarding its input. Client side validation can deal with pure local issues that don't relate to the database (the server-side) such as forcing mandatory fields, date format and validity, minimal length, etc. However, with AJAX technology we can expand the scope of local validation to also include database related issues. There is really no need to send all the data to the server and anxiously await its response just to be disappointed by finding out that we are missing a mandatory field, our date is illegal, or the credit card number is too short.
Client-side validation is based on JavaScript. APEX, in its current versions 3.2.x and earlier doesn't include a built-in declarative, client-side validation mechanism. However, its built-in JavaScript library includes functions that allow us to implement one ourselves.
Implementing client-side validation
The main principle of client...