moves validations to the model