From 58db17ced0ee9965f30149b25ebd79cc6f175f0a Mon Sep 17 00:00:00 2001 From: lonix1 <40320097+lonix1@users.noreply.github.com> Date: Thu, 28 Dec 2023 14:52:38 +0200 Subject: [PATCH 1/2] docs: update validation for dynamically modified form --- README.MD | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/README.MD b/README.MD index eb0c807..f19f45b 100644 --- a/README.MD +++ b/README.MD @@ -239,6 +239,12 @@ let v = new aspnetValidation.ValidationService(); v.bootstrap({ watch: true }); ``` +Alternatively, to update the validation service for a specific form (which has been modified dynamically), without using a `MutationObserver`: +```js +let form = document.getElementById('my-form'); +v.scan(form); +``` + ## Logging There is a rudimentary logging infrastructure in place if you want to get more insight into what the library is doing. @@ -254,4 +260,4 @@ export interface Logger { let v = new aspnetValidation.ValidationService(console); v.bootstrap(); -``` \ No newline at end of file +``` From 65b8e5c390a20a7ea4cf7e2375fcabc3dedce828 Mon Sep 17 00:00:00 2001 From: lonix1 <40320097+lonix1@users.noreply.github.com> Date: Thu, 28 Dec 2023 14:55:08 +0200 Subject: [PATCH 2/2] docs --- README.MD | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.MD b/README.MD index f19f45b..69e4b72 100644 --- a/README.MD +++ b/README.MD @@ -239,7 +239,7 @@ let v = new aspnetValidation.ValidationService(); v.bootstrap({ watch: true }); ``` -Alternatively, to update the validation service for a specific form (which has been modified dynamically), without using a `MutationObserver`: +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);