Moved User model validation rules to the model to allow overriding.