enabling instance validation before saving