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
假设我有请求A,有两个方法function1和function2。
在function1中我需要验证type, $validate = Validate::rule('type', 'require|number')。
在function2中我需要验证page这个参数,$validate = Validate::rule('page', 'number|max:4')。
当我验证function2中的时候,他却报出了type必须填写,他这个$validate由于是静态方法,规则会一直存在,我现在使用->only方法似乎可以解决问题,但是感觉不够优雅,一般像这种情况该如何优雅的解决问题。
The text was updated successfully, but these errors were encountered:
欢迎提价PR
Sorry, something went wrong.
No branches or pull requests
假设我有请求A,有两个方法function1和function2。
在function1中我需要验证type, $validate = Validate::rule('type', 'require|number')。
在function2中我需要验证page这个参数,$validate = Validate::rule('page', 'number|max:4')。
当我验证function2中的时候,他却报出了type必须填写,他这个$validate由于是静态方法,规则会一直存在,我现在使用->only方法似乎可以解决问题,但是感觉不够优雅,一般像这种情况该如何优雅的解决问题。
The text was updated successfully, but these errors were encountered: