Email format

04-18-2020 01:08 PM
New Contributor II

I am trying to ask the data entry users to enter an email with the below format

regex(., '^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$')

 My question is what is the type should be and also where I should put the regex function. Is it under constraint.

0 Kudos
1 Reply
Esri Notable Contributor

Hi. The help topic Formulas—Survey123 for ArcGIS | Documentation , in the Regular Expressions section describes how to use regular expressions in Survey123. The expression you have works well as a constraint when tested in Survey123 Connect. Just keep in mind that constraints are only checked when you attempt to submit data, or if within a repeat, when you attempt to move to the next record in the repeat.

0 Kudos