Hello. I want to have a space for users to enter their email address. I want to make it so that you have to enter an @ sign. What would the validation look like for this? Thanks
Discussion posts and replies are publicly visible
If you'd like a validation to make sure a user enters a syntactically-correct full email address, I have an expression rule that uses only out-of-box features that works rather well which i've posted here in the past, and would be willing to look up and repost for you if needed.
Thank you, Mike, that's very nice of you, I will consider it
In case you or anyone else wants my code for this, here is the current version:
/* Email Address Validation for Appian */ /* Allows the 'name' to contain letters, numbers, plus period and special characters: _ - + ' & % */ /* Allows the 'domain' to contain only letters, numbers, period and dash. */ if( or( isnull(trim(ri!address)), len(trim(ri!address)) > 255, length(split(trim(ri!address), " ")) > 1, count(split(ri!address, "@")) <> 2 ), false(), with( local!userPart: split(trim(ri!address),"@")[1], local!domainPart: split(trim(ri!address),"@")[2], if( or( length(split(local!domainPart, ".")) < 2, contains(split(local!userPart, "."), ""), contains(split(local!domainPart, "."), ""), not(isnull(stripwith(lower(local!domainPart), "abcdefghijklmnopqrstuvwxyz1234567890-."))), not(isnull(stripwith(lower(local!userPart), "abcdefghijklmnopqrstuvwxyz1234567890-._+'&%"))) ), false(), true() ) ) )
Saved as an Expression Rule, this code simply returns True or False, referring to whether a given email address is valid.