Top "Joi" questions

Object schema description language and validator for JavaScript objects.

Set default value of validation

I am using Joi to validate a payload of a service in my node.js server using hapijs framework. It …

javascript node.js typescript hapijs joi
Joi Validation Regex or pattern

I want to joi use regex pattern which define in variable I have a variable pattern which contains regex i.…

arrays node.js reactjs validation joi
What is the difference between Joi.object() and Joi.object().keys()?

According to Joi documentation, you can use Joi.object() like so: const object = Joi.object({ a: Joi.number().min(1).max(10).…

javascript node.js validation joi
How to validate uploaded file size with Joi

I'm using Joi to validate requests. I'm wondering how should I validate uploaded file size with Joi. I'm sending many …

validation hapijs joi
Is There A Way To Merge Joi Schemas?

Is there any way to merge two joi schemas into a single schema? Schema 1 { alpha: Joi.number().required(), beta: Joi.…

validation object merge joi
Stripping unknown keys when validating with Joi

I'm using Joi to validate a JavaScript object in the server. The schema is like the following: var schema = Joi.…

javascript node.js joi
Why is JOI more popular than AJV?

I am deciding on a validation library that I can use for both client and server side validation. I have …

javascript validation jsonschema joi ajv
Joi: "tel" is not allowed to be empty

Joi is returning the following error even though tel is set to be optional. How do we fix this? Thanks. …

javascript node.js validation joi
Joi - validate object keys and values?

how could I use Joi to validate a substitutions field has zero or more key /value pairs ? and that each …

joi
Hapi/Joi validation with nested object

I have the following validation on one of my routes: payload: { keywordGroups: Joi.array().items(Joi.object().keys({ language: Joi.…

javascript validation hapijs joi