Browse Source

commit to pull

miskson 3 years ago
parent
commit
c7c23af97d
1 changed files with 3 additions and 0 deletions
  1. 3 0
      hw9/script.js

+ 3 - 0
hw9/script.js

@@ -293,6 +293,8 @@ function Form(el, data, okCallback, cancelCallback){
 
 
     let checkInfo = (value, key, data, input, err) => {
+        console.log(this.initalData)
+        console.log(this.data)
         for(let key in this.validators) {
             if(key === 'isValid') continue;
             this.validators.isValid[key] = false
@@ -452,6 +454,7 @@ function Form(el, data, okCallback, cancelCallback){
     this.cancelCallback = cancelCallback
 
     this.data           = data
+    this.initalData = this.data    
     this.validators     = {isValid:{}}
 }