This commit is contained in:
2021-05-07 17:55:15 +00:00
parent d570a13c77
commit ea9ba291ae
3 changed files with 20 additions and 6 deletions

View File

@@ -47,7 +47,7 @@ function isNumber(n) {
//
function getControl(vm, ref) {
let ctrl = vm.$refs[ref];
console.log("getcontrol refs are", vm.$refs);
//I don't think this is required anymore
// if (ctrl === undefined) {
// //it's either a sub field in custom fields component or it's a coding error
@@ -146,9 +146,16 @@ export default {
if (vm.formState.loading) {
return true;
}
console.log("form-Required ref is:", ref); //Items[0].Notes
// if (ref.includes(".")) {
// let xxx = ref.split(".");
// console.log("split ref=", xxx);
// ref = `${xxx[xxx.length - 2]}.${xxx[xxx.length - 1]}`;
// }
// console.log("actual ref is ", ref);
let ctrl = getControl(vm, ref);
if (typeof ctrl == "undefined") {
console.log("not found");
return true;
}
@@ -157,6 +164,8 @@ export default {
return true;
}
console.log("HERE");
// "ErrorRequiredFieldEmpty": "{0} is a required field. Please enter a value for {0}",
let err = vm.$ay.t("ErrorRequiredFieldEmpty");
let fieldName = getControlLabel(ctrl);