Added functionality for custom validators using regular expressions.