email validation

Hi,

I would like to return an error if the user inputs some text instead of email.

I have the below regex and textField.  Can someone guide me how to link these two to perform the required validation.

regexmatch(
  pattern: "^[A-Z0-9\'\+\&\%_-]+(\.{0,1}[A-Z0-9\'\+\&\%_-]+)*[@]{1}[A-Z0-9.-]*[A-Z0-9-]+[.]{1}[A-Z]{2,6}$",
  searchString: ri!employee.email,
  regexFlags: "si"
)

a!textField(

label: "Email",

value: ri!employee.email,

saveInto: {ri!employee.email},

inputPurpose: "EMAIL"

)

  Discussion posts and replies are publicly visible