We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
对于Post请求,在logic中验证int类型,如果使用application/json格式传递数据,验证有问题。 具体表现为当int=0是,ThinkJS会认为该值不存在而返回参数不存在的错误。当使用application/x-www-form-urlencoded格式,则能够正确处理int=0的情况。 (例如: this.allowMethods = 'post'; this.rules = { id: 'required', type: 'required|int|in:0,1' };
如果type=0,则在application/json格式下验证错误
)
Platform: mac
Node.js Version: v6.7.0
ThinkJS Version: 2.2.13
The text was updated successfully, but these errors were encountered:
已经在 2.2.19 版本中修复
Sorry, something went wrong.
No branches or pull requests
DESC
对于Post请求,在logic中验证int类型,如果使用application/json格式传递数据,验证有问题。
具体表现为当int=0是,ThinkJS会认为该值不存在而返回参数不存在的错误。当使用application/x-www-form-urlencoded格式,则能够正确处理int=0的情况。
(例如:
this.allowMethods = 'post';
this.rules = {
id: 'required',
type: 'required|int|in:0,1'
};
)
ENV
Platform: mac
Node.js Version: v6.7.0
ThinkJS Version: 2.2.13
The text was updated successfully, but these errors were encountered: