Using Event Receiver
The only fool proof option is to create an event receiver and handle ItemUpdating
handler.
Here you have Before
and After
properties. You can use that to compare the previous values and new values.
If validation fails you can cancel the update process and redirect user to an error page.
Using JavaScript
This option people can bypass by disabling etc. In this approach you can edit the form in SharePoint designer and add logic as follows
- On Page Load get all values and store it in temporary object
- Attach a JavaScript click handler to the Save button
- On the handler you can compare temporary object with new values
- Based on that validation you can cancel the save event
The good thing about this approach is it will give a nice user experience. But its require more effort to built.