Skip to content

Commit

Permalink
fix: BASE64URL_REGEX was incorrect
Browse files Browse the repository at this point in the history
  • Loading branch information
kirillgroshkov committed Jul 18, 2024
1 parent 305bfad commit 2bafbff
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/validation/joi/joi.shared.schemas.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,8 @@ export const anySchema = Joi.any()
export const anyObjectSchema: ObjectSchema = Joi.object().options({ stripUnknown: false })

export const BASE62_REGEX = /^[a-zA-Z0-9]+$/
export const BASE64_REGEX = /^[A-Za-z0-9+/]+={0,2}$/
export const BASE64URL_REGEX = /^[\w-/]+$/
export const BASE64_REGEX = /^[a-zA-Z0-9+/]+={0,2}$/
export const BASE64URL_REGEX = /^[a-zA-Z0-9_-]+$/
export const base62Schema = stringSchema.regex(BASE62_REGEX)
export const base64Schema = stringSchema.regex(BASE64_REGEX)
export const base64UrlSchema = stringSchema.regex(BASE64URL_REGEX)
Expand Down

0 comments on commit 2bafbff

Please sign in to comment.