Add support for regex based validation in form elements.