Advanced validation in SharePoint list forms
Validation in list forms is again one of the evergreens for SharePoint professional developers and solution creators alike. In today’s skybow Advent Calendar cookie, we will see how to create form validation – regardless if simple or advanced– with skybow Solution Studio and skybow Rich Forms.
Imagine there would be a requirement to validate the form field “Request Notes”, in a way that it has to contain at least 100 characters, for everyone, except for the members of the “Management” SharePoint group (because managers don’t need to explain anything, obviously 😊).
We will open that list form, either with skybow Solution Studio or skybow Rich Forms, select the “Request notes” field, and then set the following validation expression:
[[@User.IsMemberOfGroup("Managers")]] ? true :
([[requestnotes]].length > 100)
In the “Validation text” field, we have a simple statement that the length needs to be larger than 100 characters.
The result, when you run this form and try to fill in the form with too short Request note will be as following.
Altogether, it took us less than 5 minutes to achieve this with skybow Solution Studio or skybow Rich Forms.