From 796d27c75cd099dee0da75bc6ba2f89684e7e40d Mon Sep 17 00:00:00 2001 From: shankar Date: Wed, 3 May 2017 21:31:51 +0530 Subject: [PATCH] - Dynamic Element Access (ES6) Implementation. --- src/demo/index2.html | 18 +++++++++--------- src/js/validatorNew.es6.js | 16 ++++++++++++++++ 2 files changed, 25 insertions(+), 9 deletions(-) diff --git a/src/demo/index2.html b/src/demo/index2.html index 762e1f2..c4f67be 100644 --- a/src/demo/index2.html +++ b/src/demo/index2.html @@ -13,7 +13,7 @@
- +
@@ -25,20 +25,20 @@
- - + + \ No newline at end of file diff --git a/src/js/validatorNew.es6.js b/src/js/validatorNew.es6.js index 86a97dd..c307592 100644 --- a/src/js/validatorNew.es6.js +++ b/src/js/validatorNew.es6.js @@ -45,6 +45,8 @@ class jsValidator { this.forceFilter = false; // To Filter the First load. this.initialLoad = true; + // Global options. + this.option = false; } // Initiating the Validator. @@ -53,6 +55,8 @@ class jsValidator { jsLogger.table(option); + // To Update global options. + this.option = option; // Update "jsSettings" to global object. this.jsSettings = new jsSettings().init(option); // Update "jsForm" to global object. @@ -85,6 +89,18 @@ class jsValidator { } } + // To update the DOM to make action listener. + update() { + // To Update global options. + let option = this.option; + // Update "jsSettings" to global object. + this.jsSettings = new jsSettings().init(option); + // Update "jsForm" to global object. + this.jsForm = new jsForm().init(option); + // Initiate form error setup. + this.jsFormError = new jsFormError().init(); + } + // To checking all elements from registered form. check() { // Loading JS Form.