added validation to user entity