File tree Expand file tree Collapse file tree 5 files changed +7
-0
lines changed Expand file tree Collapse file tree 5 files changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -489,6 +489,7 @@ components:
489
489
label : Replace %tablePlaceholder% from %versionPlaceholder%
490
490
name : Replace file from version transformation
491
491
FeedTransformationErrors :
492
+ csvNameContainsTxt : Custom CSV name cannot contain .txt
492
493
csvMissingName : Custom CSV must have a name.
493
494
undefinedCSVData : CSV data must be defined.
494
495
undefinedTable : Table must be defined
Original file line number Diff line number Diff line change @@ -1462,6 +1462,7 @@ components:
1462
1462
numLines : " %numLines% lines."
1463
1463
FeedTransformationErrors :
1464
1464
csvMissingName : Custom CSV must have a name.
1465
+ csvNameContainsTxt : Custom CSV name cannot contain .txt
1465
1466
undefinedCSVData : CSV data must be defined.
1466
1467
undefinedTable : Table must be defined
1467
1468
PatternStopCard :
Original file line number Diff line number Diff line change @@ -1433,6 +1433,7 @@ components:
1433
1433
adminTestFailed : You have attempted to view a restricted page without proper credentials
1434
1434
FeedTransformationErrors :
1435
1435
csvMissingName : Custom CSV must have a name.
1436
+ csvNameContainsTxt : Custom CSV name cannot contain .txt
1436
1437
undefinedCSVData : CSV data must be defined.
1437
1438
undefinedTable : Table must be defined
1438
1439
PatternStopCard :
Original file line number Diff line number Diff line change @@ -58,6 +58,9 @@ export default class AddCustomFile extends Component<TransformProps<AddCustomFil
58
58
if ( ! table ) {
59
59
issues . push ( CSV_VALIDATION_ERRORS . CSV_MUST_HAVE_NAME )
60
60
}
61
+ if ( table && table . includes ( '.txt' ) ) {
62
+ issues . push ( CSV_VALIDATION_ERRORS . CSV_NAME_CONTAINS_TXT )
63
+ }
61
64
return issues
62
65
}
63
66
Original file line number Diff line number Diff line change 2
2
// Values are keys to YAML error messages.
3
3
const CSV_VALIDATION_ERRORS = {
4
4
CSV_MUST_HAVE_NAME : 'csvMissingName' ,
5
+ CSV_NAME_CONTAINS_TXT : 'csvNameContainsTxt' ,
5
6
TABLE_MUST_BE_DEFINED : 'undefinedTable' ,
6
7
UNDEFINED_CSV_DATA : 'undefinedCSVData'
7
8
}
You can’t perform that action at this time.
0 commit comments