is it possible to pass multiple email address in one textbox and validate

in interface ,i  want a textbox in which i want to paste some mail addresses and then i need to validate those email address

  Discussion posts and replies are publicly visible

Parents Reply
  • 0
    Certified Lead Developer
    in reply to sanchitg0002

    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
      )
    )

Children