Javascript Validation Demo

This form contains all the validation options that are offered by the JS Validation library. To see how this works, view the source of this page. Since the custom_alpha options are quite advanced and unlikely to be used that often (and because it's a pain figuring out a match for all of the cases!) I've filled in matching strings for those fields.

Standard form fields

Required field:

Date fields

Any (valid) date:
Any date later than today:

Numbers / alphanumeric fields

Any integer: (required)
Enter a number from 1-100:
Enter a number greater than 100:
Enter a number greater than or equal to 100:
Enter a number less than 100:
Enter a number less than or equal to 100:
Enter any letter: (optional)
Enter any alphanumeric characters: (required)
Enter strings in the fields according to the following legend:
L An uppercase letter. V An uppercase vowel.
l A lowercase letter. v A lowercase vowel.
D A letter (upper or lower) F A vowel (upper or lower)
C An uppercase Consonant x Any number, 0-9
c A lowercase consonant X Any number, 1-9
E A consonant (upper or lower)

Enter your favourite colour: (lowercase, optional)
Enter your favourite colour: (case-insensitive, required)

Length of field input

Enter 2 characters:
Enter between 3 and 5 chars:
Enter over 5 characters:
Enter at least 5 characters:
Enter less than 5 characters:
Enter less than or equal to 5 characters:

Custom function

Enter any prime number under 100

Password fields

Enter a password:
Enter a password (re-enter):

Conditional (if-else) fields

Your gender: Male Female
Who's your favourite Care Bear? (Men):
How much can you bench? (Women):