Using #jQuery to attach regular expression validation to a #SharePoint list form field #SP2010 #PS2010 #ProjectServer #in
On one of my current projects I have had cause to ensure that no special characters are in the Title field of a SharePoint 2010 list form.
This is because we are using the Title field as the Plan Name in a Project Create process in Project Server 2010. As a result we need to ensure that the Event Handler we are creating has validated data that the PS2010 PSI Web Service can accept for the Plan Name.
I created the following script to validate the data being entered into the Title field of the list form as it is being entered.
I manipulate the Save Buttons in the ribbon and the list form to ensure that the user cannot enter invalid data into the form.
To ensure a good user experience, I add an extra <DIV> element next to the Title field to notify the user of what is going on.