laravel 方法 Illuminate\Validation\Validator::validateNullablerequired 不存在
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/49794468/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Method Illuminate\Validation\Validator::validateNullablerequired does not exist
提问by Nasir Khan
What actually wrong here?
这里究竟有什么问题?
When i am going to submit my form this error appears. Please give me the solution.
当我要提交我的表单时,会出现此错误。请给我解决方案。
回答by jay thanki
I solve by changing number to numeric because there no laravel validation name as number
我通过将数字更改为数字来解决,因为没有 laravel 验证名称作为数字
Before
前
'required|number|max:10'
After
后
'required|numeric|max:10'
回答by Nasir Khan
I have got the solutin!!! I just forgot to put "|" between Nullable and Required this is the solution 'sometimes|nullable|string'
我有解决方案!!!我只是忘了放“|” 在 Nullable 和 Required 之间,这是解决方案 'sometimes|nullable|string'