How do I customize bootstrap‘s $form-validation-state?

I ve been trying to solve this for hours and I cant find the solution. All I want is to add the property ‚background-color: black‘ to the invalid state.
Here is the doc. Scroll down to sass.
https://getbootstrap.com/docs/5.3/forms/validation/#browser-defaults,

This is the appraoch if you want to change the $theme-color or $spacer, but it doesnt work on $custom-validation-states and the doc doesn't say exactly how to do it.
css   
@import "~bootstrap/scss/functions";
@import "~bootstrap/scss/variables";
@import "~bootstrap/scss/mixins";

$custom-validation-states: (
  "invalid": (
    "background-color": black,
  ),
);

$form-validation-states: map-merge(
  $form-validation-states,
  $custom-validation-states
); 

@import "~bootstrap/scss/bootstrap";
IMG_2400.jpg
IMG_2401.jpg
IMG_2402.jpg
Provide valuable, actionable feedback to your users with HTML5 form validation, via browser default behaviors or custom styles and JavaScript.
Was this page helpful?