Skip to content

Commit

Permalink
fix: uuid/ulid regex
Browse files Browse the repository at this point in the history
  • Loading branch information
kalinkrustev committed Sep 30, 2024
1 parent 56055c3 commit 5661049
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/api/participants/routes.js
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,7 @@ module.exports = [
description: 'Record Funds In or Out of participant account',
validate: {
payload: Joi.object({
transferId: Joi.string().pattern(/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-7][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|[0-9A-HJKMNP-TV-Z]{26})$/).required(),
transferId: Joi.string().pattern(/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-7][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]}$|^[0-9A-HJKMNP-TV-Z]{26}$6})$/).required(),
externalReference: Joi.string().required(),
action: Joi.string().required().valid('recordFundsIn', 'recordFundsOutPrepareReserve').label('action is missing or not supported'),
reason: Joi.string().required(),
Expand Down Expand Up @@ -345,7 +345,7 @@ module.exports = [
params: Joi.object({
name: nameValidator,
id: Joi.number().integer().positive(),
transferId: Joi.string().pattern(/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-7][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|[0-9A-HJKMNP-TV-Z]{26})$/).required()
transferId: Joi.string().pattern(/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-7][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]}$|^[0-9A-HJKMNP-TV-Z]{26}$6})$/).required()
})
}
}
Expand Down

0 comments on commit 5661049

Please sign in to comment.