updates
This commit is contained in:
@@ -134,6 +134,7 @@ export class FormValidator extends Validator {
|
||||
: El('p', {}, input.value).textContent.trim();
|
||||
|
||||
let ruleList = rules[ name ].split('|');
|
||||
let format = { value: Validator.INPUT_STR };
|
||||
|
||||
for (let tokenRule of ruleList) {
|
||||
|
||||
@@ -147,10 +148,10 @@ export class FormValidator extends Validator {
|
||||
throw new Error(`The rule "{${rule}}" does not exist`);
|
||||
}
|
||||
|
||||
let format = { value: Validator.INPUT_STR };
|
||||
|
||||
let result = this.handlers[ rule ] (val ?? null, !!input, args, format);
|
||||
|
||||
console.log( val + ' ' + rule + ' ' + JSON.stringify ( format) )
|
||||
|
||||
if (result === false) {
|
||||
|
||||
pass = false;
|
||||
|
||||
Reference in New Issue
Block a user