-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Closed
Labels
featureNew functionality or improvementNew functionality or improvement
Description
Is there a way to output "Password Confirmation must match password" when a schema like this is used (from customMessage.js language example):
password_confirmation: Joi.any().valid(Joi.ref('password')).required().options({ language: { any: { allowOnly: 'must match password' } } })
That customMessage.js example currently outputs:
password_confirmation must match password
I would like to be able to do something like this (added a "label()" call to the end):
password_confirmation: Joi.any().valid(Joi.ref('password')).required().options({ language: { any: { allowOnly: 'must match password' } } }).label('Password Confirmation')
Where the label replaces the key so that it outputs:
Password Confirmation must match password
Is this already possible and I'm misunderstanding something?
This issue has been brought up once before here: #190
That issue was closed when the language addition was added, but unless I'm misunderstanding something, the language update didn't address the original issue so I'm opening a new issue (I don't have a lot of experience with Github issues so if there is a better way of reopening an issue, let me know).
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
featureNew functionality or improvementNew functionality or improvement