Forum Discussion
StephanieHarris
5 years agoQrew Assistant Captain
Would there be a similar solution to ensure that an email address in an email address field meets standard email conventions (ends in ".com") ?
------------------------------
Stephanie Stephanie
------------------------------
------------------------------
Stephanie Stephanie
------------------------------
MarkShnier__You
Qrew Legend
5 years agoThis is my current formula for validating email addresses. It is possible that others out there have a more comprehensive one.
var text email = Trim([Quoted Dealer Email]); // Substitute in your own email field name here.
var text Warning =If($email="", "Missing email address",
List( "<br>",
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)
Quick Base Solution Provider
Your Quick Base Coach
http://QuickBaseCoach.com
mark.shnier@gmail.com
------------------------------
var text email = Trim([Quoted Dealer Email]); // Substitute in your own email field name here.
var text Warning =If($email="", "Missing email address",
List( "<br>",
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)
Quick Base Solution Provider
Your Quick Base Coach
http://QuickBaseCoach.com
mark.shnier@gmail.com
------------------------------