mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-16 04:43:35 +00:00
feat: improve preset building
This commit is contained in:
committed by
Carlos Valente
parent
5bc286145d
commit
a1fab10bfd
@@ -8,7 +8,6 @@ export const regex = {
|
||||
isASCII: /^[ -~]+$/, // https://catonmat.net/my-favorite-regex
|
||||
isASCIIorEmpty: /^$|^[ -~]+$/, // https://catonmat.net/my-favorite-regex
|
||||
isNotEmpty: /\S/,
|
||||
isUrlSafe: /^[a-zA-Z0-9_-]*$/, // https://stackoverflow.com/questions/24419067/validate-a-string-to-be-url-safe-using-regex
|
||||
};
|
||||
|
||||
export const checkRegex = {
|
||||
@@ -21,5 +20,4 @@ export const checkRegex = {
|
||||
isASCII: (text: string): boolean => regex.isASCII.test(text),
|
||||
isASCIIorEmpty: (text: string): boolean => regex.isASCIIorEmpty.test(text),
|
||||
isNotEmpty: (text: string): boolean => regex.isNotEmpty.test(text),
|
||||
isUrlSafe: (text: string): boolean => regex.isUrlSafe.test(text),
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user