Base solution for your next web application
Open Closed

Set User First Name Non-Mandatory #11205


User avatar
0
MellowoodMedical created

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)
  • User Avatar
    0
    musa.demir created

    Hi @MellowoodMedical

    Can you please open abp related quesitons in https://support.abp.io/QA/Questions. The team that developed the abp project and is more experienced in abp will assist you.

  • User Avatar
    0
    MellowoodMedical created

    Hi @musa.demir, thanks for the link will ask them there.

  • User Avatar
    0
    MellowoodMedical created

    Hi @musa.demir,

    I noticed that the link you provided for the help center is for abp.io, we are using asp.net zero and we do not have an account in abp.io.

  • User Avatar
    0
    musa.demir created

    Yes it is abp.io's support center because it is what you said in the message.

    What is your product version? I am using ABP CLI 5.3.2

    What is ABP Framework version? 5.3.2

    Aspnet zero does not even have 5.3.2 version

  • User Avatar
    0
    MellowoodMedical created

    Hi @musa.demir, sorry for the confusion I think I wrongly typed the version, it's 5.3.0 and the picture you attached from your response is correct.

    Thanks

  • User Avatar
    0
    ismcagdas created
    Support Team

    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.