Skip to content
This repository was archived by the owner on May 25, 2025. It is now read-only.

Commit 4a34392

Browse files
chore: cleanup
1 parent 53de988 commit 4a34392

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/validation/joi/joi.shared.schemas.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -156,11 +156,11 @@ export const utcOffsetSchema = numberSchema
156156
.max(14 * 60)
157157
.dividable(15)
158158

159-
const supportedTimezones = new Set(Intl.supportedValuesOf('timeZone'))
160-
161-
export const ianaTimezoneSchema = stringSchema.valid(...supportedTimezones).messages({
162-
'any.only': `must be a valid IANA timezone string`,
163-
})
159+
export const ianaTimezoneSchema = stringSchema
160+
.valid(...Intl.supportedValuesOf('timeZone'))
161+
.messages({
162+
'any.only': `must be a valid IANA timezone string`,
163+
})
164164

165165
export const ipAddressSchema = stringSchema.ip()
166166

0 commit comments

Comments
 (0)