aspnet / jquery-validation-unobtrusive

Add-on to jQuery Validation to enable unobtrusive validation options in data-* attributes.
MIT License
257 stars 113 forks source link

Ability to change field-validation class names #151

Closed robstruthers closed 2 years ago

robstruthers commented 2 years ago

I am currently using jquery-validation-unobtrusive with a Bootstrap 5 site. By changing the options I can get the input fields to work with bootstrap without any additional work by doing the below:

var settings = {
    validClass: "is-valid",
    errorClass: "is-invalid"

};

The issue I am having is that the error messages displayed below the input fields are wrapped in field-validation-valid and field-validation-invalid classes but, I can not find anywhere that these class names can be changed. If this were possible it would then be straightforward to overwrite them to the Bootstrap class names of valid-feedback and invalid-feedback

mkArtakMSFT commented 2 years ago

Thanks for contacting us. We're not making any improvements in this area as we prefer to work on more important areas of the framework instead. Only critical blocking issue with wide impact and security issues are considered.