added validation for User model