fixes #36. validate regular expressions as part of form.