-
I have a fairly complex validation object shared on multiple routes. Sometimes with slight modifications which are handled by joi.alternatives:
```
//generic.id = Joi.alternatives().try(
// Joi.stri…
Gregy updated
6 years ago
-
I believe the existing schema API is already based heavily on [`Joi`](https://github.com/hapijs/joi). I think it would make a lot of sense to just move to it completely.
1. Reduce complexity of `think…
-
Need to figure out how to handle patterns for regex in a generic way so I can add.
-
```
lib.stringify( joi.string().min(1).max(60).trim().required() )
// 'string:min=1,max=60,required'
```
Could provide above methods? or similar?
Thank you!
-
#### Support plan
* *is this issue currently blocking your project?* (yes/no): yes
* *is this issue affecting a production system?* (yes/no): no
#### Context
* *node version*: N/A
* *modu…
-
### **Hướng dẫn**
---
**Sử dụng [`joi`](https://joi.dev/api/?v=17.9.1) để validate**
```js
import Joi from 'joi';
```
**Đăng nhập**
```js
const loginSchema = Joi.object({
email: Joi.s…
-
simple example
```ts
import Joi from '@hapi/joi';
import 'joi-extract-type';
var schema = Joi.object({
one: Joi.array().items({ a: Joi.string().required() }),
two: Joi.array().items({ a: …
-
#### Support plan
* *is this issue currently blocking your project?* (yes/no): No
* *is this issue affecting a production system?* (yes/no): No
#### Context
* *node version*: v15.6.…
-
#### Support plan
* *is this issue currently blocking your project?* (yes/no): no
* *is this issue affecting a production system?* (yes/no): no
#### Context
* *node version*: >= 16.14.0
* *…
-
I have done a comparison of Joi and Yup core schemas. I have noticed a few things :
- Yup.string accepts all types and people don't expect that at start. It would be cool if it would be stricter in t…