You can’t add your own validation types to <cfinput>, but you can extend the validation by providing regular expressions. A regular expression is a search pattern used to match strings. Full coverage of regular expressions is beyond the scope of this book, but here is an example to help explain the concept.
Interested in learning more about regular xxpressions? You may want to get a copy of Sams Teach Yourself Regular Expressions in 10 Minutes (Sams, ISBN 0672325667).
Colors used in Web pages are often specified as RGB values (colors specified in amounts of red, green, and blue). RGB values are six characters long—three sets of two hexadecimal values (00 to FF). To obtain a set of RGB values in a ...