Fixed validation in user model.