brk
brk

Reputation: 427

Column validation in Sharepoint's list

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

enter image description here

Upvotes: 0

Views: 855

Answers (1)

Michael Han
Michael Han

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

Related Questions