New to ColdFusion MX7 the isValid() function tests whether a value meets a validation or data type rule and returns True if the value conforms to the rule; False, otherwise.
1 2 3
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
There are a lot of pre-existing functions that can already do a lot of what isValid() offers like:
But with isValid() you can do those as well as things like:
- creditcard (mod10 checks for credit cards)
- variablename (a string formatted according to ColdFusion variable naming conventions)
There are also a few US specific test conditions as well like “ssn” and “telephone” etc.
All in all this is an extremely versatile tag to use for validation and will save you oodles of time!