Fix validation to use validateregex, closes #1837