{{ requiredColumnValidationError }}
+
+ {{ noSelectedColumnError }}
+
@@ -39,7 +46,7 @@
-
+
|
@@ -117,6 +124,12 @@ export default {
return `Following columns are required : ${missingRequiredColumns.map(c => c._cn).join(', ')}`
}
return false
+ },
+ noSelectedColumnError() {
+ if ((this.mappings || []).filter(v => v.enabled === true).length == 0) {
+ return 'At least one column has to be selected'
+ }
+ return false
}
},
mounted() {
@@ -129,6 +142,11 @@ export default {
return true
}
+ // if it is not selected, then pass validation
+ if (!row.enabled) {
+ return true
+ }
+
const v = this.meta && this.meta.columns.find(c => c._cn === _cn)
if ((this.mappings || []).filter(v => v.destCn === _cn).length > 1) { return 'Duplicate mapping found, please remove one of the mapping' }
|