Skip to main content
Question

Email address validation

  • February 25, 2024
  • 0 replies
  • 491 views

Forum|alt.badge.img+4

Is there a way to force an email address field to force it to have a "valid" email address makeup?  I realize I can't actually validate the email address itself, but I want to require them to at least put in an email address in a valid format?  (I have seen this on multiple forms across the internet, of course.)



------------------------------
Gonzo - A Newbie, but learning fast. (Former SmartSheet evangelist who is quickly converting to QuickBase)
IT Director City of New Braunfels
------------------------------
This topic has been closed for replies.

MarkShnierYou
Forum|alt.badge.img+24

There is not a built in function for this, but some of us have formulas squirreled away to do our own validation.  try this one

var text email = Trim([My Email Field]); 

// you will need to decide what to do about leading and trailing spaces.  This tends to happen with copy paste by users.  probably best to treat the field as raw input and use Trim([MyField] )  for all subsequent use of the data entry field. 

var text Warning =If($email="", "Missing email address",

List( "<br>",
//If( begins($email," "), "Leading space character" ), // should not be necessary if TRIMed
//If( ends  ($email," "), "Trailing space character" ), // should not be necessary if TRIMed
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(contains($email, "("), "email contains a bracket ( or ) - that can't be right" )

));

If($Warning<>"", "<font color=red>" & $Warning)

 



------------------------------
Mark Shnier (Your Quickbase Coach)
mark.shnier@gmail.com
------------------------------

Forum|alt.badge.img
  • Registered
  • September 17, 2024

Hello - I just tried https://www.quickbase.com/exchange and am having trouble navigating/searching for above email formula field.  Can you please post a direct link?