Skip to content

Commit

Permalink
Merge branch 'main' into patch-2
Browse files Browse the repository at this point in the history
  • Loading branch information
lonix1 authored Dec 29, 2023
2 parents cab03cb + d9cbcd4 commit 3cc2926
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion README.MD
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,12 @@ let v = new aspnetValidation.ValidationService();
v.bootstrap({ watch: true });
```

Alternatively, to update the validation service for a specific form (which was created or modified dynamically) without using a `MutationObserver`:
```js
let form = document.getElementById('my-form');
v.scan(form);
```

## Customizing CSS for use with other libraries

One can customize the CSS classes so the generated markup is compatible with various frameworks. For example, to integrate with [Bootstrap](https://getbootstrap.com/docs/5.3/forms/validation) (v5+):
Expand All @@ -254,7 +260,6 @@ v.ValidationMessageValidCssClassName = 'valid-feedback'; // change
//v.ValidationSummaryCssClassName = 'validation-summary-errors'; // unnecessary: bootstrap lacks validation summary component
//v.ValidationSummaryValidCssClassName = 'validation-summary-valid'; // "
v.bootstrap();
```

## Logging

Expand Down

0 comments on commit 3cc2926

Please sign in to comment.