mirror of
https://github.com/BradNut/umami
synced 2025-09-08 17:40:29 +00:00
Fix yup.
This commit is contained in:
parent
e6eb9a487e
commit
febf085aca
1 changed files with 2 additions and 2 deletions
|
|
@ -21,11 +21,11 @@ export function getFilterValidation(matchRegex) {
|
|||
export const TimezoneTest = yup.string().test(
|
||||
'timezone',
|
||||
() => `Invalid timezone`,
|
||||
value => !value || !moment.tz.zone(value),
|
||||
value => moment.tz.zone(value) !== null,
|
||||
);
|
||||
|
||||
export const UnitTypeTest = yup.string().test(
|
||||
'unit',
|
||||
() => `Invalid unit`,
|
||||
value => !value || !UNIT_TYPES.includes(value),
|
||||
value => UNIT_TYPES.includes(value),
|
||||
);
|
||||
|
|
|
|||
Loading…
Reference in a new issue