Category "joi"

Password matching validation using the Joi schema in React not working

I want to create a password change form in React. Here is the code of my component : import React, { Component } from "react"; import Joi from "joi-browser"; im

UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): AssertionError [ERR_ASSERTION]

I have the following setup in Visual Studio Code for nodejs project: Model: genre.js const Joi = require('joi'); const mongoose = require('mongoose'); const

Joi - make everything required by default?

I'm building out a Node/Express API and using Joi for validation. It's a great package and has been incredibly useful. However, we're getting tired of doing thi

Joi - make everything required by default?

I'm building out a Node/Express API and using Joi for validation. It's a great package and has been incredibly useful. However, we're getting tired of doing thi

Is there a way to define an integer property as int64 in a Joi model that is used by Hapi Swagger

I am having the following Joi model const SimpleModel = Joi.object({ id: Joi.number().integer().required().description('ID') }).label('SimpleModel'); The m

How do I index only the property names from another object, but leave values to be inferred?

I have the following example joi validation schema const joiUser = { firstName: joi.string().required(), // inferred type: joi.BoxStringSchema<joi.Box<