Reputation: 427
I am new to Sharepoint. I want to create a validation rule in column validation to validate the given email address. Here is my code:
=AND(
ISERROR(FIND(” “, [Email],1)),
IF(ISERROR(FIND(“@”, [Email],2)),
FALSE,
AND(
ISERROR(FIND(“@”,[Email], FIND(“@”, [Email],2)+1)),
IF(ISERROR(FIND(“.”, [Email], FIND(“@”, [Email],2)+2)),
FALSE,
FIND(“.”, [Email], FIND(“@”, [Email],2)+2) < LEN([Email])
)
)
)
)
but the "ISERROR" function does not work and i get a syntax error. My column name is: Email and the type is: Single line of text
Upvotes: 0
Views: 855
Reputation: 3655
Per test, your code works fine on my environment.
Please make sure one thing: please use double quotes with English characters in the validation. It should be ""
instead of “”
.
=AND(
ISERROR(FIND(" ", [Email],1)),
IF(ISERROR(FIND("@", [Email],2)),
FALSE,
AND(
ISERROR(FIND("@",[Email], FIND("@", [Email],2)+1)),
IF(ISERROR(FIND(".", [Email], FIND("@", [Email],2)+2)),
FALSE,
FIND(".", [Email], FIND("@", [Email],2)+2) < LEN([Email])
)
)
)
)
Upvotes: 1