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
Yes, but these emails must be separated by some delimiter.
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 ) )
delimiter can we be only comma or we can have space
In the above example I have used space only, you can use any delimiter.
Could not display interface. Please check definition and inputs. Interface Definition: Expression evaluation error at function 'split' [line 7]: A null parameter has been passed as parameter 1.Can you please help me with this
Sorry I forgot to add null check, I have updated the code above please copy again and check.
Thank you .It's working , is it possible to have line break it must validate like this
jason@test.com
amrutha@test.com
prasanth@test.com
Yes, just use paragraph field in place of text field and pass char(10) as delimiter in split function.
is it possible to implement the same with pickerFieldUsers?
What are you talking about? pickerFieldUsers component is used to select existing users.
Yes ,I want to enter the already existing users as below format and then it should validate with already existing users with the Api / usergroups