Forum Discussion

JenniferJuhasz's avatar
JenniferJuhasz
Qrew Trainee
3 years ago

Pop-up or red-flag when a user incorrectly enters an email address; auto-corrections for &nbsp errors?

Hi hi folks,

Two questions:

  • One of our forms that staff input data into collects the email addresses of the people they communicate with so we can send them a survey at the end of the month.
We're finding that periodically we get typos - someone rushes, or copies and pastes and accidentally includes spaces or special characters or forgets to complete the email address altogether. 
While the field "type" IS email - there doesn't seem to be any built in way to flag "hey - what you put in doesn't equal a valid email address".
The field is used in a dozen different reports, forms, and I run pipelines off of it, so I don't know if replacing it with a different field would make sense.  Is there a way to write a formula text field immediately after it that says - if Field ID 70 doesn't equal a valid email address, display warning?
Also - we don't 'require' it to be populated every time a user completes the form, as we don't necessarily collect email addresses every time we speak to a person.

  • Periodically a user will copy/paste into a form, or will input a special character and we get errors like   (I believe that's for spaces, quotation marks I think are different?) - Is there any way to essentially search our Quickbase Realm for these errors and either delete the offending characters or change them to something acceptable (depending on the error code - I think there are different ones depending on the special character)?  I'm thinking I could possibly write a Pipeline to do this, but I'm not quite sure if it's a reasonable thing to do or not.

Any creative ideas on how to address these two things?

Thank you!

Jen

------------------------------
Jennifer Juhasz
------------------------------

1 Reply

  • Here 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
    ------------------------------