Ends in:
7 DAYS
19 HRS
9 MIN
21 SEC
Ends in:
7 D
19 H
9 M
21 S
Open Closed

FluentValidation Not being Shown in Form Inputs #7536


User avatar
0
nabass created

I am trying to apply FluentValidation to the CreateUpdateZacatCompanyDto class, but the error messages from the CreateUpdateZacatCompanyDtoValidator, which inherits from AbstractValidator<CreateUpdateZacatCompanyDto>, are not being displayed.

I have created all the necessary classes and injected the configuration into the module. How can I ensure that the error messages are shown for each field?


3 Answer(s)
  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    Hi,

    FluentValidation does not provide integration with Blazor out of the box

    see: https://docs.fluentvalidation.net/en/latest/blazor.html

    You can consider to use Blazorise validation https://blazorise.com/docs/components/validation

  • User Avatar
    0
    nabass created

    Is there any way to use FluentValidation as attribute based validation? Alternatively, how can I apply FluentValidation inside the DTO so that it works for both the backend and the frontend?

  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    Hi,

    No , as the fluent validation document mentioned, it does not support Blazor.

Made with ❤️ on ABP v9.1.0-preview. Updated on November 20, 2024, 13:06