Forum Discussion
MarkShnier__You
Qrew Legend
4 years agoHere is a Rich Text validation formula for emails that i user. Maybe others have some additional lines they can suggest to improve it.
var text email = Trim([Quoted Dealer Email]);
var text Warning =If($email="", "Missing email address",
List( "<br>",
If( begins($email," "), "Leading space character" ),
If( ends ($email," "), "Trailing space character" ),
If( not Contains($email,"@"), "Missing @ symbol" ),
If( not Contains(Part($email, 2, "@" ),"."), "Missing .com or similar at the end" ),
If( Contains($email, " "), "Has a space inside the email address" ),
//If(Part($email, 1,"<>[]{},")<>"", "Bad characters in in the email address"),
If(Part($email, 2,"<>[]{},")<>"", "Bad characters in in the email address"),
If(Begins($email,"<"), "Bad characters in email address"),
If(Ends($email,">"), "Bad characters in email address"),
If(Contains($email, "mailto"), "Bad email address"),
If(Contains($email, ":"), "Bad email address" ),
If(Ends($email, "."), "email ends in a period - that can't be right" ),
If(contains($email, ")"), "email contains a bracket ( or ) - that can't be right" )
));
If($Warning<>"", "<font color=red>" & $Warning)
------------------------------
Mark Shnier (YQC)
mark.shnier@gmail.com
------------------------------
var text email = Trim([Quoted Dealer Email]);
var text Warning =If($email="", "Missing email address",
List( "<br>",
If( begins($email," "), "Leading space character" ),
If( ends ($email," "), "Trailing space character" ),
If( not Contains($email,"@"), "Missing @ symbol" ),
If( not Contains(Part($email, 2, "@" ),"."), "Missing .com or similar at the end" ),
If( Contains($email, " "), "Has a space inside the email address" ),
//If(Part($email, 1,"<>[]{},")<>"", "Bad characters in in the email address"),
If(Part($email, 2,"<>[]{},")<>"", "Bad characters in in the email address"),
If(Begins($email,"<"), "Bad characters in email address"),
If(Ends($email,">"), "Bad characters in email address"),
If(Contains($email, "mailto"), "Bad email address"),
If(Contains($email, ":"), "Bad email address" ),
If(Ends($email, "."), "email ends in a period - that can't be right" ),
If(contains($email, ")"), "email contains a bracket ( or ) - that can't be right" )
));
If($Warning<>"", "<font color=red>" & $Warning)
------------------------------
Mark Shnier (YQC)
mark.shnier@gmail.com
------------------------------