Invalid if email address contains certain characters ie commers spaces etc

How do i use the expression invalid if email address contains certain characters ie ; , " " etc, for the comer I have tried โ€œCONTAINS([EMAIL], โ€œ,โ€)โ€ in the Invalid value error column but it does not work
TIA

0 5 328
5 REPLIES 5

@MyVideoi_Productions
Try with this:

NOT(CONTAINS(".,:;-_", USEREMAIL())

Unfortunately not, the column is Title โ€œClients Emailโ€ if that makes a difference
This statement is false:
โ€ฆ(".,:;-,_") contains the text value (USEREMAIL())

@MyVideoi_Productions

NOT(CONTAINS(".,:;-_", [Clients Email]))

I hate to seem argumentative and please correct me if I am wrong!

I believe the arguments in the CONTAINS() function need to be reversed like so,

...CONTAINS([Clients Email], "..."))

Also I donโ€™t think the function treats ".,:;-_" as a list of items. Instead it will search for that as a substring in the email so will likely always return FALSE.

Unfortunately I donโ€™t think CONTAINS() excepts a list at all. So you would need a separate CONTAINS() function for each special character you wanted to check against.

NOT(OR(
       CONTAINS([Clients Email], ","),
       CONTAINS([Clients Email], ":"),
       ...etc
      )
   ) 

FYI, I tried testing with IN() function. It is no better than the CONTAINS() function.

Steve
Platinum 4
Platinum 4

Try:

NOT(
  OR(
    CONTAINS([EMAIL], ","),
    CONTAINS([EMAIL], ";"),
    CONTAINS([EMAIL], " "),
    ...
  )
)

Itโ€™s bulky, but itโ€™s the only way to do it.

Top Labels in this Space