= a!localVariables( local!emails: ri!test.emailAddresses, local!individualMail: if( a!isNullOrEmpty(local!emails), {}, reject(fn!isnull(_), split(local!emails, char(10))) ), local!invalidEmails: substitute( tostring( reject( fn!isnull(_), a!forEach( items: local!individualMail, expression: if( regexmatch( pattern:"^[A-Z0-9\_-]+(\.{0,1}[A-Z0-9\+_-]+)*[@]{1}[A-Z0-9.-]*[A-Z0-9-]+[.]{1}[A-Z]{2,6}$", searchString: fv!item, regexFlags: "si" ), null, fv!index ) ) ) ), ";", "," ), local!validation: if( isnull(local!invalidEmails), {}, "Emails must be in a valid format, and each email must be on a new line. " ), a!formLayout( label: "Test", contents: { a!sectionLayout( contents: { a!columnsLayout( columns: { a!columnLayout( contents: { a!boxLayout( label: "", labelSize: "EXTRA_SMALL", contents: { a!paragraphField( label: "Email Addresses", labelPosition: "JUSTIFIED", placeholder: "Email Addresses should be one per line (can be pasted from Excel) ", value: ri!test.emailAddresses, saveInto: ri!test.emailAddresses, refreshAfter: "UNFOCUS", height: "TALL", required: true, validations: local!validation ) }, style: "#134f5c", marginBelow: "STANDARD" ) } ) } ) } ) }, buttons: a!buttonLayout( primaryButtons: { a!buttonWidget( label: "Submit", saveInto: { }, submit: true, style: "PRIMARY" ) }, secondaryButtons: { a!buttonWidget( label: "Cancel", value: true, saveInto: ri!cancel, submit: true, style: "NORMAL", validate: false ) } ) ) )
it should throw error on UI saying "emails doesn't exists" on the interface and user should be able to correct incorrect emails and then resubmit same form again.
can some please help with process model design and interface
Discussion posts and replies are publicly visible
Harshit Bumb (Appyzie) : you mean this way?
Yes.
thank you but this is to get validation right?