Comments (6)
能否提供一个报错的例子?
from parameter.
Same here
(required = false) cannt work with (allowEmpty = true)
from parameter.
同问呀,前端传的字段是null,但是后端配置了type=int,required = false, allowEmpty = true,会报错呀
from parameter.
能否提供一个报错的例子?
前端传参{sort: null},
后端eggjs在controller校验规则为sort: { type: 'int', required: false, allowEmpty: true},
报错{"message":"should be an integer","code":"invalid","field":"sort"}
from parameter.
同问+1
from parameter.
同问+1
from parameter.
Related Issues (20)
- 如果要验证一个字段不能匹配上正则,例如一个字段不能包含一些特殊字符,是应该怎么写规则。
- How to add rule check uuid
- i can't check numeric enum
- 有支持 typescript 的打算么?
- Why not update feat: custom error message HOT 1
- convert 开启 校验之后会修改原数据 HOT 1
- 无用的一行
- convertType didn't work with array HOT 1
- One Of 是否支持呢 HOT 1
- 希望增加未知字段过滤,或存在未知字段时报错的选项。 HOT 2
- int 验证规则有问题 HOT 1
- How can I pass a function type,using addRule? HOT 1
- 该项目是否还有人维护呢
- [Feature request] Remove not permitted attributes
- I feel there is something wrong with this line of code in function checkArray()
- Trying to get in touch regarding a security issue
- 有没有ts的描述文件
- when I use http://127.0.0.1:80 in url rule,I got should be a url error HOT 1
- 当给值赋值 undefined 时,required: false 校验失败
- 急!按照例子上的来, 无法使用数组中嵌套object
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from parameter.