コード例 #1
0
        private async Task ValidateUserName(UserManager <TUser> manager, TUser user, ICollection <IdentityError> errors)
        {
            var userName = await manager.GetUserNameAsync(user);

            if (userName?.Length < RequiredUsernameLength)
            {
                errors.Add(Describer.UsernameTooShort());
            }
        }