password: Joi.string().min(3).max(15).required().label('Password'),
password_confirmation: Joi.any().equal(Joi.ref('password'))
.required()
.label('Confirm password')
.messages({ 'any.only': '{{#label}} does not match' })
password: Joi.string().min(3).max(15).required().label('Password'),
password_confirmation: Joi.any().equal(Joi.ref('password'))
.required()
.label('Confirm password')
.options({ messages: { 'any.only': '{{#label}} does not match'} })
password: Joi.string().min(3).max(15).required(),
password_confirmation: Joi.any().valid(Joi.ref('password')).required().options({ language: { any: { allowOnly: 'must match password' } } })