I have a joi schema like this The input can contain birthday and age at the same time or just one of the keys. If one of the keys does not exist, I ...
I have a joi schema like this The input can contain birthday and age at the same time or just one of the keys. If one of the keys does not exist, I ...
I have a query parameter method which can have 4 values like sum, sub, div, mul. I want to validate if only above 4 values are passed in the query par ...
I'm trying to validate the name using a Joi function but it tells me that Joi.validate is not a function. I have looked at similar questions and their ...
I have an array of object where data possibly be empty, like below I am trying to validate this. my schema is on services.validate(inputFields) ...
How to check either both limit and offset are provided or none of them ...
I am validating the property subscription like this: If subscription not one of these 'starter', 'pro', 'business', I have a message ""subscriptio ...
example arrays: const first = { class: 'XYZ', people: [{ id: 1, name: "John", isCreator: false }, { id: 2 ...
Error message: password: Joi.min(4).required() ^ TypeError: Joi.min is not a function ...
Requirements The object has two properties: A number, let's call it firstField A string, let's call it secondField Now here are the validati ...
I'm trying to customize an .or() function message on Joi, like this: The Joi default message is this one: Validation Error: "value" must contai ...
I am having an array of objects to validate from the specific schemas and if any of the objects matches with the given schemas, I want to validate aga ...
What currently I have is this: and the output which I am getting is "Disclaimer checkbox contains invalid value". What I need is label which conta ...
I'm tyring to valid req.body, and the valid values is one item from the array. Is there a way to do that? Code: ...
{ "email": "{{$randomExampleEmail}}", "dateofbirth": "2000-01-09", "personal_document":{ "document_front":"url", "document ...
I have the following joi schema: Joi.object({ name: Joi.string().required(), params: Joi.array().items(Joi.object({ type: Joi.str ...
I'm investigating using the Hapi framework on Node.js for building a website where the requirement is for it to work fully with javascript disabled in ...
I have a factory that returns data from different services. The data from the raw source each factory service hits is mapped from its original format ...
I have this joi schema which requires that if you pass in id, you must also pass in type. I want to make it so that if you pass in id, you must als ...
I am trying to create schema using JOI custom. The body model: I want the statistics value to be less than level multiplied by certain value. At t ...
How can I use Joi to throw a WARNING but not an ERROR if a particular element does not exist? My Code: I can successfully see a warning when the b ...