Multiple email address validation check

I need to validate if the list is line delimited and in a valid email format using regex in paragraph field .  If not , throw a validation message.


test@test.com

test2@test.com

test3@test.com

  Discussion posts and replies are publicly visible

Parents
  • 0
    Certified Lead Developer

    For validating an email address you can certainly contrive a complex regular expression to test for validity, though these days I just recommend using the "validateEmailAddress()" rule found in, i think, People Functions.

    As far as "line delimited" - you'll need to implement your own parsing / checking for that part, depending on exactly what you want.  It could be as simple as splitting the input on the linebreak character (char(10)) then validating each (non-empty) line in the resulting set - that would simply require looping over the validate email function.

Reply
  • 0
    Certified Lead Developer

    For validating an email address you can certainly contrive a complex regular expression to test for validity, though these days I just recommend using the "validateEmailAddress()" rule found in, i think, People Functions.

    As far as "line delimited" - you'll need to implement your own parsing / checking for that part, depending on exactly what you want.  It could be as simple as splitting the input on the linebreak character (char(10)) then validating each (non-empty) line in the resulting set - that would simply require looping over the validate email function.

Children