Browse Source

fix: csv import validation rule correction and improvement

Signed-off-by: Pranav C <pranavxc@gmail.com>

#880
pull/948/head
Pranav C 3 years ago
parent
commit
f8d24359b9
  1. 9
      packages/nc-gui/components/project/spreadsheet/components/importExport/columnMappingModal.vue

9
packages/nc-gui/components/project/spreadsheet/components/importExport/columnMappingModal.vue

@ -124,10 +124,15 @@ export default {
},
methods: {
validateField(v, row) {
if (!v) {
validateField(_cn, row) {
if (!_cn) {
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' }
switch (v.uidt) {
case UITypes.Number:
if (this.parsedCsv && this.parsedCsv.data && this.parsedCsv.data.slice(0, 500)

Loading…
Cancel
Save