MODE-1783 - Fixed the lack of constraint validation when updating properties

This PR should be merged into 3.1.x and cherry-picked into master.