=/* Email Address Validation for Appian 7+ */ /* 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( len(trim(ri!address)) > 255, length(split(trim(ri!address), " ")) > 1, length(split(ri!address, "@")) <> 2 ), false(), with( localPart: split(trim(ri!address),"@")[1], domainPart: split(trim(ri!address),"@")[2], if( or( length(split(domainPart, ".")) < 2, contains(split(localPart, "."), ""), contains(split(domainPart, "."), ""), not(isnull(stripwith(lower(domainPart), "abcdefghijklmnopqrstuvwxyz1234567890-."))), not(isnull(stripwith(lower(localPart), "abcdefghijklmnopqrstuvwxyz1234567890-._+'&%"))) ), false(), true() ) ) )