Validate values before setting in serializable