I’ve just made another upgrade to the JS validation script. The PHP validation script won’t be far behind – give me a day or two.

Here’s the new features that have been added:

  1. a new custom_alpha validation rule, which lets you validate strings according to extremely specific criteria. You can specify whether a character at a particular position is a uppercase or lowercase letter, consonant or vowel, or a number between 0-9 or 1-9. This is something of a layman’s version of the following feature:
  2. a new reg_exp validation rule which lets you validate the contents of a form field based on a regular expression. This is really only intended for programmers.
  3. a new function validation rule, which I’ve been meaning to add for months! Again, this is really for programmers only. Sometimes you may have find that you needed to supplement the existing script functionality with your own custom validation – let’s face it, no script can accommodate EVERY possible check. Before version 2.2 you had to do some creative hacks to let this happen – or drop the script altogether. But now you can embed your own custom functions directly within the other rules so that the standard flow of sequential execution of each rule will be untouched. Effectively, this new rule removes all restrictions from the JS validation script since you can now expand it however you want.

I’ve also provided two versions of the code for download: the regular version (22KB) and a compressed version (8KB). Unless you plan on editing the code, I strongly suggest using the compressed version.

So enjoy! I’ll be including this new version in the next release of Form Tools.