Activities of "stjepanh_teched"

  • ABP Framework version: v4.4.2.
  • UI type: Blazor
  • DB provider: EF Core

Hello, we are trying to localize the deafult messages from data annotation validation attributes on the client side. Using Blazorise validation works, but we've opted to use Blazor form elements. Is it possible to make localization work in that context? Basic example:

Component.razor:

        <EditForm Model="model" OnValidSubmit="SubmitAsync">
            <DataAnnotationsValidator />
            <InputText id="name" @bind-Value="model.Test" />
            <ValidationMessage For="() => model.Test" />
            <Button Type="ButtonType.Submit">Button</Button>
        </EditForm>

Model DTO:

    public class TestDto
    {
        [Required(ErrorMessage = "Required1"]
        public string Test { get; set; }
    }

We've added key-value pair in en.json: "Required1": "test test {0}"

This is the result: Any help?

Thank you in advance

Hi,

I have couple of questions regarding the abp commercial identity module extensibility:

  • Is it possible to remove existing property from identity module? For example, we don't need phone number property in our project, how can we remove it?
  • Is it possible to set existing property as required. For example, we need "Surname" property to be required in database.
  • Is it possible to change existing property visibility on the UI? We've followed the instructions in the ModuleExtensionConfigurator - configuring visibility of the new properties works but configuring existing (predefinied) properties doesn't. Example:
    user.AddOrUpdateProperty<string>(
            "Surname",
            property =>
            {
                    property.UI.OnTable.IsVisible = false;
            }
    );
  • We've managed to add new property to module per instructions in documentation, but there are couple of problems with it:
    • How to set new property as required in database?

    • How to enable client side validation for the property? We've set required attribute with the following: property.Attributes.Add(new RequiredAttribute());

      But only server side validation works (modal window pops up if field is empty) - is it possible to enable client side validation for new properties? Same goes for field length. We have set the following in ModuleExtensionConfigurator: property.Attributes.Add(new MaxLengthAttribute(UserConsts.MaxTitleLength));

      But only the server side validation is triggered.

Thank you in advance, Hrvoje

Showing 1 to 2 of 2 entries
Made with ❤️ on ABP v9.1.0-preview. Updated on December 26, 2024, 06:07