validation before calling attribute_will_change