...
title | Work in Progress |
---|
jQuery Validation Plugin
Excerpt |
---|
The standard formtool library leverages Jörn Zaefferer's jQuery Validation Plugin. |
...
Open core/webtop/thirdparty/jquery-validate/additional-methods.js to see all documented validation functions.
Differences to Farcry 5
Versions of FarCry prior to 6 utilised a mixture of Javascript libraries to build the various features of the formtool engine. Specifically we used prototype for simple validation. jQuery is now the sole library (with jQueryUI), and the validation methods have been replaced with the equivalent jQuery function.
FC6 (jQuery) | FC5 (Prototype) | Description |
---|---|---|
required | required | (not blank) |
number | validate-number | (a valid number) |
digits | validate-digits | (digits only) |
date | validate-date | (a valid date value) |
validate-email | (a valid email address) | |
url | validate-url | |
| validate-date-au | (a date formatted as; dd/mm/yyyy) |
| validate-currency-dollar | (a valid dollar value) |
| validate-selection | (first option e.g. 'Select one...' is not selected option) |
| validate-one-required | (At least one textbox/radio element must be selected in a group) |
creditcard |
| Credit Card Number |
lettersonly* | validate-alpha | (letters only) |
alphanumeric* | validate-alphanum | (only letters and numbers) |
dateISO* |
| 2010-09-30 |
letterswithbasicpunc* |
| abc123.?!: |
nowhitespace* |
| no blanks |
time* |
| 23:59 |
...