validations work correctly