change the checkValidity script to validate
 strings with an enum rather than a regular
 expression.