refactor: extract regex utilities

This commit is contained in:
Carlos Valente
2025-07-20 07:14:54 +02:00
committed by Carlos Valente
parent 44508ce8b4
commit 5bc286145d
10 changed files with 82 additions and 46 deletions
@@ -17,7 +17,7 @@ import {
validateTimerType,
validateEndAction,
customFieldLabelToKey,
isAlphanumericWithSpace,
checkRegex,
} from 'ontime-utils';
import { Merge } from 'ts-essentials';
@@ -325,7 +325,7 @@ export function getCustomFieldData(
for (const ontimeLabel in importMap.custom) {
// if the label is not valid, we skip the import
if (!isAlphanumericWithSpace(ontimeLabel)) {
if (!checkRegex.isAlphanumericWithSpace(ontimeLabel)) {
continue;
}