What is your product version?
- I am using ABP CLI 5.3.2
What is your product type (Angular or MVC)?
- Angular
What is product framework type (.net framework or .net core)?
- .Net Core
What is ABP Framework version?
- 5.3.2
We have a requirement from client to make user first name non-mandatory I know that in asp.net zero this is a required field. I am trying to find a way but couldn't find a good solution from forums to do this with minimal changes. Is there a way, or a work around for this requirement?
6 Answer(s)
-
0
Hi @MellowoodMedical
This field is marked as required here https://github.com/aspnetboilerplate/aspnetboilerplate/blob/dev/src/Abp.Zero.Common/Authorization/Users/AbpUserBase.cs#L111. So, you can define a new filed in User.cs in your project as shown below;
[StringLength(MaxNameLength)] public new string Name { get; set; }
Afther that, you need to add a new migration to mark this field as non-required on DB as well. After all, you also need to remove required attribute from UserEditDto's Name field and also from the UI input.