WEB-753 The cell field should be in numeric format only. (#3182)

This commit is contained in:
Soni Jay
2026-02-18 14:13:10 -06:00
committed by GitHub
parent 973484481b
commit b494c29821
3 changed files with 29 additions and 2 deletions
+21
View File
@@ -257,4 +257,25 @@ export class Datatables {
return false;
}
}
public isPhoneNumberField(columnName: string): boolean {
if (!columnName) {
return false;
}
const normalizedName = columnName.toLowerCase().replace(/[_\s]+/g, '');
const phonePatterns = [
/\bphone\b/,
/\btelefono\b/,
/\bcelular\b/,
/\bmobile(?:phone|no|num|number)?\b/,
/\bfijo\b/,
/\blandline\b/,
/\bcellphone\b/,
/\bofficephone\b/,
/\bhomephone\b/,
/\bmtn\b/,
/\bairtel\b/
];
return phonePatterns.some((pattern) => pattern.test(normalizedName));
}
}