mirror of
https://github.com/kremalicious/umami.git
synced 2024-11-22 09:57:00 +01:00
Fix yup.
This commit is contained in:
parent
e6eb9a487e
commit
febf085aca
@ -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 New Issue
Block a user