Skip to content

Commit 478e7e8

Browse files
Update IBMiContent.ts to use validQsysName
Use validQsysName rather than individual checks
1 parent d1442c5 commit 478e7e8

File tree

1 file changed

+5
-10
lines changed

1 file changed

+5
-10
lines changed

src/api/IBMiContent.ts

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -453,17 +453,12 @@ export default class IBMiContent {
453453

454454
newLibl = newLibl
455455
.filter(lib => {
456-
if (lib.match(/^\d/)) {
457-
badLibs.push(lib);
458-
return false;
456+
const isValid = this.ibmi.validQsysName(lib);
457+
if(!isValid){
458+
badLibs.push(lib);
459459
}
460-
461-
if (lib.length > 10) {
462-
badLibs.push(lib);
463-
return false;
464-
}
465-
466-
return true;
460+
461+
return isValid;
467462
});
468463

469464
const sanitized = Tools.sanitizeObjNamesForPase(newLibl);

0 commit comments

Comments
 (0)