I recently migrated to new joi repo (@hapi/joi => joi)
Now I am getting error when running server
throw new AssertError([result.error.details[0].message]); ^ Error: "language" is not allowed
I searched google and SO , but cant find solution
This is my code :
forgetUser: {
query: {
email: Joi.string().regex(/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/)
.required()
.options({ language: { string: { regex: { base: 'must be valid' } } } })
.label('Email')
}
},
Please help me?