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

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:

1 Like

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 :slight_smile:

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

1 Like