added the validation in user model