SharePoint email address column validation

I was looking for code to validate a list column as an email address. I came across this post ( thanks Chris Kent ) which gave me the answer:

=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])
 ))) )

Its a little piece of magic ....

Comments

Popular posts from this blog

SharePoint 2013: Error updating managed account credentials

Error deploying Nintex workflow: An item with the same key has already been added