Skip to content

Customise validation css class names #58570

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
1 task done
lonix1 opened this issue Oct 22, 2024 · 1 comment
Closed
1 task done

Customise validation css class names #58570

lonix1 opened this issue Oct 22, 2024 · 1 comment
Labels
area-blazor Includes: Blazor, Razor Components

Comments

@lonix1
Copy link
Contributor

lonix1 commented Oct 22, 2024

Is there an existing issue for this?

  • I have searched the existing issues

Is your feature request related to a problem? Please describe the problem.

For invalid form fields, the razor engine outputs hardcoded css class names: input-validation-error, input-validation-valid, field-validation-error, field-validation-valid, etc.

When using a ui library (bootstrap, tailwind, etc.) one needs different classes. For example, for bootstrap it's is-invalid, is-valid, invalid-feedback, valid-feedback, etc.

One can rename these in JS, but that is a hack. It also makes it very difficult to use various js libraries.

Describe the solution you'd like

Please allow us to customise those class names during startup.

Additional context

This problem goes back years. I realise that #8573 and #40935 are not going to be done in the short term.

So at least allow us to change the css class names, which will give us more flexibility for now.

@MackinnonBuck
Copy link
Member

Thanks for reaching out.

We're going to use #8573 to track this, so closing this out as a duplicate.

@MackinnonBuck MackinnonBuck closed this as not planned Won't fix, can't repro, duplicate, stale Oct 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-blazor Includes: Blazor, Razor Components
Projects
None yet
Development

No branches or pull requests

2 participants