updated classes to extend the Regex validator