Thursday, May 28, 2015

Nintex Forms & Sharepoint Column Validations - Email Address



Email is the one field that has started coming up in most of my forms and a validation for this field is really important when there is a workflow associated with this field.

SharePoint 2010, SP2013 :


Formula :

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

Replace [Email] with your list column name and paste this formula in the column validations section.


 
 
The basic rules being enforced here are:
  • Email contains No Spaces
  • Email should have only 1 @ symbol
  • @ symbol cannot be the first character
  • Should have at least 1 . after the @ symbol
  • Should have at least 1 character between the @ and the .
  • Email Field cannot have the last character as the .

Nintex Forms :

I started working on Nintex forms recently and its been a cake walk. Its super easy and simple and I will have a dedicated blog on Nintex forms as well shortly.
 
Meanwhile, if you have validations in your SharePoint columns and have a Nintex form associated with it the validations do not appear in the Nintex form.
 
Nintex form has controls which have huge capabilities
 


In the validation section choose regex : \b[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,4}\b

 
    Happy Coding!

No comments:

Post a Comment