Adjust the way unique validations are handled and add documentation