-
Notifications
You must be signed in to change notification settings - Fork 9
Open
Description
In the Felicity.example() method, when in joiSchema there is a pattern() validation, the max() validation is not respected.
const payeeSchema = {
bank_identifier: Joi.number().integer().min(1).max(999).required(),
bank_branch: Joi.string().trim().pattern(/^\w+(?:\s+\w+)$/).max(4).required(),
bank_branch_identifier: Joi.string().trim().pattern(/^\w+(?:\s+\w+)$/).max(1).required(),
bank_account: Joi.string().trim().pattern(/^\w+(?:\s+\w+)$/).max(12).required(),
bank_account_identifier:Joi.string().trim().pattern(/^\w+(?:\s+\w+)$/).max(1).required(),
registered_number:Joi.number().integer().min(1).max(99999999999999),
type:Joi.number().integer().valid(1, 2).required(),
name:Joi.string().trim().pattern(/^\w+(?:\s+\w+)*$/).max(30).required()
}
Metadata
Metadata
Assignees
Labels
No labels