User Email authentication error

Hi all, trying to add a new user to the app. He has an apostrophe in the email that I think is preventing login? At the moment I have no other explanation for this.

I went through the normal process of adding a user, at first I thought the email wasnt correctly pasted into the field but after re-adding it was clear it was. The user sent me the screenshot from below. (I edited out full email/appsheet id) Just for the purpose of revealing the error message and email.

Is this a common issue? Or what can I do to resolve. Thanks

0 11 804
11 REPLIES 11

Steve
Platinum 4
Platinum 4

Email addresses may not contain apostrophes.

@Steve
@Sarah_Keown
According to RFC 3696 apostrophes are valid as long as they come before the @ symbol. However the latter is, Google rejects any emails containing an apostrophes because they are considered as SQL injection devices. You may also read this:

I also have challenges with typos in Email Addresses.
According to me reading up hereโ€™s a list of characters that cannot be used in an email address - like two โ€œ@โ€ signs. Also other characters like "!, @ # $ % ^ & * ( ) ? ~ โ€™ " cannot be used in an email addressโ€ฆ basically only alphanumeric and numeric and โ€œ@โ€ and โ€œ_โ€ and โ€œ-โ€ and โ€œ.โ€
And an Email address should also not end with โ€œ.โ€

@Steve and @LeventK How would one put this in a Valid_If expression?

Thereโ€™s no good way to do the complex data validation youโ€™d need for this using expressions. Your best bet is to capture the email address into a column of type Email, which does some validation.

@Steve it is already captured in an Email Field and this only Tests for the โ€œ@โ€ and โ€œ.โ€ character as far as I know

If I use this formula in the Valid_If,
IFS(CONTAINS([_THIS], โ€œ@โ€), CONTAINS([_THIS], โ€œ.โ€), TRUE, FALSE) ,
and add all the characters like "!, @ # $ % ^ & * ( ) ? ~ โ€™ " in there, will it work?

With a Validation Error of,
IFS(NOT(CONTAINS([_THIS], โ€œ@โ€)), โ€œThe Email format must contain a โ€˜@โ€™ signโ€, NOT(CONTAINS([_THIS], โ€œ.โ€)), "The Email format must contain a โ€˜.โ€™ sign " )

@Steve I tried IFS(CONTAINS([VisitorEmail], โ€œ@โ€), CONTAINS([VisitorEmail], โ€œ.โ€), TRUE, FALSE) and it Validates, but as soon as I add another CONTAINS in, E.g. CONTAINS([VisitorEmail], โ€œ!โ€), then I get a syntax error that IFS is used incorrectly

My formula โ€”> IFS(CONTAINS([VisitorEmail], โ€œ@โ€), CONTAINS([VisitorEmail], โ€œ.โ€), CONTAINS([VisitorEmail], โ€œ!โ€),TRUE, FALSE) โ€” gives a syntax error โ€”> โ€œIFS function is used incorrectly:Inputs to IFS() must be one or more condition-value pairs.โ€

@Steve - ignore my syntax error. Formula should be โ€”> IFS(CONTAINS([VisitorEmail], โ€œ@โ€), TRUE, CONTAINS([VisitorEmail], โ€œ.โ€),TRUE, CONTAINS([VisitorEmail], โ€œ!โ€), TRUE, CONTAINS([VisitorEmail], โ€œ#โ€), TRUE)

What are you trying to accomplish with that validation?

  1. If the email address contains @, the address is valid.

  2. Only if (1) fails and the address contains ., the address is valid. But itโ€™s not: it doesnโ€™t contain @.

  3. Only if (1) and (2) fail and the address contains !, the address is valid. No, itโ€™s not.

  4. Only if (1), (2), and (3) fail and the address contains #, the address is valid. Nope.

So Iโ€™m confused.

@Steve I want to validate if the Email Contains Invalid Characters like "!, @ # $ % ^ & * ( ) ? ~ โ€™ " and also ensure that it contains at least the โ€œ@โ€ and the ". "
My application of the solution using CONTAINS() is confusing you, apologies, but I am not a developer and skilled in coding logic

Try:

AND(
  CONTAINS([VisitorEmail], "@"),
  CONTAINS([VisitorEmail], "."),
  NOT(CONTAINS([VisitorEmail], "!")),
  NOT(CONTAINS([VisitorEmail], "#")),
  NOT(CONTAINS([VisitorEmail], "$")),
  NOT(CONTAINS([VisitorEmail], "%")),
  NOT(CONTAINS([VisitorEmail], "^")),
  NOT(CONTAINS([VisitorEmail], "*")),
  NOT(CONTAINS([VisitorEmail], "(")),
  NOT(CONTAINS([VisitorEmail], ")")),
  NOT(CONTAINS([VisitorEmail], "?")),
  NOT(CONTAINS([VisitorEmail], "`"))
)

Works like a charm @Steve. Maybe add it under Tips&Tricks
Thanks

Top Labels in this Space