Open Closed

Module Entity Extensions don't work for Blazor #755


User avatar
0
maxim@kolychev.msk.ru created

Check the docs before asking a question: https://docs.abp.io/en/commercial/latest/ Check the samples, to see the basic tasks: https://docs.abp.io/en/commercial/latest/samples/index The exact solution to your question may have been answered before, please use the search on the homepage.

  • ABP Framework version: v4.1.0-RC2
  • UI type: Blazor
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Seperated (Angular): yes
  • Exception message and stack trace: The following errors were detected during validation. - The SocialSecurityNumber field is required.
  • Steps to reproduce the issue:

Uncomment rows in _ModuleExtensionConfigurator.ConfigureExtraProperties

    private static void ConfigureExtraProperties()
    {
           ObjectExtensionManager.Instance.Modules()
              .ConfigureIdentity(identity =>
              {
                  identity.ConfigureUser(user =>
                  {
                      user.AddOrUpdateProperty<string>( //property type: string
                          "SocialSecurityNumber", //property name
                          property =>
                          {
                              //validation rules
                              property.Attributes.Add(new RequiredAttribute());
                              property.Attributes.Add(new StringLengthAttribute(64) {MinimumLength = 4});
                          }
                      );
                  });
              });
    }

No changes in UI (no columns or fields SocialSecurityNumber like https://docs.abp.io/en/abp/latest/Module-Entity-Extensions) After press Save button in Edit form we see error message: The following errors were detected during validation. - The SocialSecurityNumber field is required.


4 Answer(s)
  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    Maybe this PR will implement this.

    https://github.com/abpframework/abp/pull/6647

  • User Avatar
    0
    hikalkan created
    Support Team Co-Founder

    This is not implemented for the Blazor UI yet. Still work in progress.

  • User Avatar
    0
    nparejod created

    Hello,

    I have the same issue.

    What would it be the workaround at this moment if we need to add a new field to the AbpUser table using Blazor?

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi nparejod

    I suggest you wait for Blazor's implementation.

    You can also refer to the implementation of MVC. https://github.com/abpframework/abp/blob/dev/modules/identity/src/Volo.Abp.Identity.Web/Pages/Identity/Users/CreateModal.cshtml#L32

Made with ❤️ on ABP v8.2.0-preview Updated on March 25, 2024, 15:11