@processmaker/screen-builder 2.77.16 → 2.77.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/vue-form-builder.common.js +383 -65
- package/dist/vue-form-builder.common.js.map +1 -1
- package/dist/vue-form-builder.umd.js +383 -65
- package/dist/vue-form-builder.umd.js.map +1 -1
- package/dist/vue-form-builder.umd.min.js +1 -1
- package/dist/vue-form-builder.umd.min.js.map +1 -1
- package/package.json +1 -1
- package/src/mixins/extensions/ValidationRules.js +18 -2
package/package.json
CHANGED
|
@@ -17,8 +17,8 @@ export default {
|
|
|
17
17
|
console.error("Invalid variable name");
|
|
18
18
|
}
|
|
19
19
|
} else {
|
|
20
|
-
properties[':class'] = `{ 'form-group--error': showValidationErrors && ${this.checkVariableExists('$v.vdata.' + element.config.name)} && $v.vdata.${element.config.name}.$invalid || showValidationErrors && ${this.checkVariableExists('$v.schema.' + element.config.name)} && $v.schema.${element.config.name}.$invalid }`;
|
|
21
|
-
properties[':error'] = `showValidationErrors && ${this.checkVariableExists('$v.vdata.' + element.config.name)} && validationMessage($v.vdata.${element.config.name}) || showValidationErrors && ${this.checkVariableExists('$v.schema.' + element.config.name)} && validationMessage($v.schema.${element.config.name})`;
|
|
20
|
+
properties[':class'] = `{ 'form-group--error': (showValidationErrors || ${this.fieldValidationShow(element)}) && ${this.checkVariableExists('$v.vdata.' + element.config.name)} && $v.vdata.${element.config.name}.$invalid || (showValidationErrors || ${this.fieldValidationShow(element)}) && ${this.checkVariableExists('$v.schema.' + element.config.name)} && $v.schema.${element.config.name}.$invalid }`;
|
|
21
|
+
properties[':error'] = `(showValidationErrors || ${this.fieldValidationShow(element)}) && ${this.checkVariableExists('$v.vdata.' + element.config.name)} && validationMessage($v.vdata.${element.config.name}) || (showValidationErrors || ${this.fieldValidationShow(element)}) && ${this.checkVariableExists('$v.schema.' + element.config.name)} && validationMessage($v.schema.${element.config.name})`;
|
|
22
22
|
}
|
|
23
23
|
}
|
|
24
24
|
},
|
|
@@ -53,5 +53,21 @@ export default {
|
|
|
53
53
|
}, {str: '', variable: ''});
|
|
54
54
|
return check.str;
|
|
55
55
|
},
|
|
56
|
+
fieldValidationShow (element) {
|
|
57
|
+
let showError = true;
|
|
58
|
+
if (element.config && element.config.validation) {
|
|
59
|
+
const validationHidden = ['Required', 'Required if'];
|
|
60
|
+
if (Array.isArray(element.config.validation)) {
|
|
61
|
+
element.config.validation.forEach((validation) => {
|
|
62
|
+
if (validationHidden.includes(validation.content)) {
|
|
63
|
+
showError = false;
|
|
64
|
+
}
|
|
65
|
+
});
|
|
66
|
+
} else {
|
|
67
|
+
showError = validationHidden.includes(element.config.validation);
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
return showError;
|
|
71
|
+
}
|
|
56
72
|
},
|
|
57
73
|
};
|