Accept and validate several emails in UiPath input form

Hi everybody,

I am using a Form Builder from UiPath.Form.Activities 1.8.0 to create an input form, which would collect some user input for an attended bot. The user must be able to enter several emails into an Email field. However, I could not find how to make a built in Email field accept several emails. Is that even possible? Or do I have to resort to using a simple text field with some regex validation? How should I make it recognize each separate email (if multiple emails are entered) and check whether each of them conforms to regex validation?

Thanks in advance for your tips!

1 Like

Make a note in that field for users to enter multiple mail ids with semicolon symbol in between like this

Mailid-1 ; mailid-2;

Then you can use split method at the back end of the process and separate each mail with ; symbol inbetween

As simple as that

Cheers @jreddy

Hey, thanks for your suggestion! I was considering that too. But would be cool if validation could be implemented on field change, the same way as a built in validation in the form, so that the user does not have to re-enter all the data again if email validation fails. Is there any way to do that?

1 Like

When you Open the Form Designer and use a Text Field, In the Validation Tab, there is a Regular Expression Input to be given, If you provide

”^([\w.-]+)@([\w-]+)((.(\w){2,3})+)$"

in that field, it will only accept mail if in that format

Cheers @jreddy

But regex validation seems to work only for the first email. I have adjusted your suggested regex to [[\w.-]+@([\w-]+)((.(\w){2,3})+)(;?)(\s*)]? so that now it would consider several emails separated by β€œ;”. It works fine on regex101.com, but fails in UiPath. The issue seems to be missing β€œglobal” flag. Any idea how I can set it in form validation?