{"action":"created","issue":{"url":"https://api.github.com/repos/aspnetboilerplate/aspnetboilerplate/issues/3460","repository_url":"https://api.github.com/repos/aspnetboilerplate/aspnetboilerplate","labels_url":"https://api.github.com/repos/aspnetboilerplate/aspnetboilerplate/issues/3460/labels{/name}","comments_url":"https://api.github.com/repos/aspnetboilerplate/aspnetboilerplate/issues/3460/comments","events_url":"https://api.github.com/repos/aspnetboilerplate/aspnetboilerplate/issues/3460/events","html_url":"https://github.com/aspnetboilerplate/aspnetboilerplate/issues/3460","id":328923829,"node_id":"MDU6SXNzdWUzMjg5MjM4Mjk=","number":3460,"title":"Username length validation error","user":{"login":"dotnetshadow","id":296247,"node_id":"MDQ6VXNlcjI5NjI0Nw==","avatar_url":"https://avatars1.githubusercontent.com/u/296247?v=4","gravatar_id":"","url":"https://api.github.com/users/dotnetshadow","html_url":"https://github.com/dotnetshadow","followers_url":"https://api.github.com/users/dotnetshadow/followers","following_url":"https://api.github.com/users/dotnetshadow/following{/other_user}","gists_url":"https://api.github.com/users/dotnetshadow/gists{/gist_id}","starred_url":"https://api.github.com/users/dotnetshadow/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dotnetshadow/subscriptions","organizations_url":"https://api.github.com/users/dotnetshadow/orgs","repos_url":"https://api.github.com/users/dotnetshadow/repos","events_url":"https://api.github.com/users/dotnetshadow/events{/privacy}","received_events_url":"https://api.github.com/users/dotnetshadow/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-06-04T06:28:43Z","updated_at":"2018-06-04T08:10:16Z","closed_at":null,"author_association":"NONE","body":"Hi there\r\n\r\nFirstly a great job with this framework. I am trying to change the UserName length to 256. I've read many posts where it's suggested to override the UserName  StringLength. But for some reason it doesn't appear to work for me\r\n\r\n\r\n\r\n**Your Abp package version.**\r\n3.8.0\r\n**Your base framework: .Net Framework or .Net Core.**\r\n.Net Core\r\n**Exception message and stack trace if available.**\r\nYour request is not valid!\r\nThe following errors were detected during validation. - The field UserName must be a string with a maximum length of 32. \r\n\r\n**Steps needed to reproduce the problem.**\r\nDownload ASP.NET Core 2.0 Multipage version\r\nRun the web app\r\n\r\nChanged the Username length to 256 in both the *User* and *UserDto* classes\r\n```csharp\r\npublic class User : AbpUser<User>\r\n    {\r\n        public const string DefaultPassword = \"123qwe\";\r\n\r\n        // OVERRIDE here\r\n        [StringLength(256)]\r\n        [MaxLength(256)]\r\n        public override string UserName { get; set; }\r\n\r\n        public static string CreateRandomPassword()\r\n        {\r\n            return Guid.NewGuid().ToString(\"N\").Truncate(16);\r\n        }\r\n\r\n        public static User CreateTenantAdminUser(int tenantId, string emailAddress)\r\n        {\r\n            var user = new User\r\n            {\r\n                TenantId = tenantId,\r\n                UserName = AdminUserName,\r\n                Name = AdminUserName,\r\n                Surname = AdminUserName,\r\n                EmailAddress = emailAddress\r\n            };\r\n\r\n            user.SetNormalizedNames();\r\n\r\n            return user;\r\n        }\r\n    }\r\n```\r\n\r\n![image](https://user-images.githubusercontent.com/296247/40901417-7a115fe6-6813-11e8-90a6-040790fd750f.png)\r\n\r\nNo matter what I try the validator still thinks I'm trying to use max length 32, am I overriding in the wrong error? \r\n"},"comment":{"url":"https://api.github.com/repos/aspnetboilerplate/aspnetboilerplate/issues/comments/394270013","html_url":"https://github.com/aspnetboilerplate/aspnetboilerplate/issues/3460#issuecomment-394270013","issue_url":"https://api.github.com/repos/aspnetboilerplate/aspnetboilerplate/issues/3460","id":394270013,"node_id":"MDEyOklzc3VlQ29tbWVudDM5NDI3MDAxMw==","user":{"login":"ryancyq","id":6453214,"node_id":"MDQ6VXNlcjY0NTMyMTQ=","avatar_url":"https://avatars2.githubusercontent.com/u/6453214?v=4","gravatar_id":"","url":"https://api.github.com/users/ryancyq","html_url":"https://github.com/ryancyq","followers_url":"https://api.github.com/users/ryancyq/followers","following_url":"https://api.github.com/users/ryancyq/following{/other_user}","gists_url":"https://api.github.com/users/ryancyq/gists{/gist_id}","starred_url":"https://api.github.com/users/ryancyq/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ryancyq/subscriptions","organizations_url":"https://api.github.com/users/ryancyq/orgs","repos_url":"https://api.github.com/users/ryancyq/repos","events_url":"https://api.github.com/users/ryancyq/events{/privacy}","received_events_url":"https://api.github.com/users/ryancyq/received_events","type":"User","site_admin":false},"created_at":"2018-06-04T08:10:16Z","updated_at":"2018-06-04T08:10:16Z","author_association":"CONTRIBUTOR","body":"Did you change the value here [CreateUserDto](https://github.com/aspnetboilerplate/module-zero-core-template/blob/master/aspnet-core/src/AbpCompanyName.AbpProjectName.Application/Users/Dto/CreateUserDto.cs#L14)?"}}
{"actor":{"display_login":"ryancyq"}}