Email validation

a!localVariables(
  local!emails,
  local!invalidEmails: if(
    isnull(local!emails),
    {},
    joinarray(
      reject(
        isnull(_),
        a!forEach(
          items: split(local!emails, " "),
          expression: if(
            validateemailaddress(fv!item),
            null,
            fv!index
          )
        )
      ),
      ","
    )
  ),
  local!validation: if(
    isnull(local!invalidEmails),
    {},
    "Invalid email at " & local!invalidEmails & " position(s)"
  ),
  a!textField(
    label: "Enter emails",
    value: local!emails,
    saveInto: local!emails,
    validations: local!validation
  )
)

I want my email addresses validation each mail should be in one line otherwise throw an error and email format should be correct other wise throw an error.
( test@test.com
 test2@test.com
 test3@test.com


can someone help me with the code and how to store this email address in line by line in db

  Discussion posts and replies are publicly visible

Parents Reply Children