-
-
Notifications
You must be signed in to change notification settings - Fork 175
New issue
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
[L5.4] BadMethodCallException Method [explodeRules] does not exist. #245
Comments
Found a solution on one of the forks of this package, here's the patch hopefully it could make it's way to the |
@Omranic Thanks for the proposed solution. I've tried to apply it but it's breaking unit tests. Right now RuleParser class awaiting DelegatedValidator which has Could you provide an example of code which fails to work? |
Sure, I've used exactly this example: https://github.com/proengsoft/laravel-jsvalidation/wiki/Conditional-Validation-Example $validationRules = [
'email' => 'required|email',
'games' => 'required|numeric',
];
$jsValidator = JsValidator::make($validationRules);
$jsValidator->sometimes('reason', 'required|max:500'); Whenever I write that last line |
check if this rule is implemented in this package or not
Sent from iPhone
…On 15 Jun 2017, 4:43 PM +0500, Abdelrahman Omran ***@***.***>, wrote:
Sure, I've used exactly this example: https://github.com/proengsoft/laravel-jsvalidation/wiki/Conditional-Validation-Example
$validationRules = [
'email' => 'required|email',
'games' => 'required|numeric',
];
$jsValidator = JsValidator::make($validationRules);
$jsValidator->sometimes('reason', 'required|max:500');
Whenever I write that last line $jsValidator->sometimes('reason', 'required|max:500'); with Laravel 5.4+ I get the above exception.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.
|
@a-komarev Any updates on this? |
@Omranic No. Could you write unit tests for this case? |
@Omranic is this issue still exists? There were a lot of changes in |
@a-komarev Hi, it still exist on 5.5 |
Confirmed still an issue on 5.5.28 :/ |
Trying to implement Conditional Validation resulting the following error:
BadMethodCallException Method [explodeRules] does not exist.
Tested with both Laravel 5.4 & 5.5 with
master
branch of this package. Same error on both. Any suggestions?Observation: This package is calling
explodeRules
on theIlluminate\Validation\Validator
which doesn't have this method, while this method exists onIlluminate\Validation\ValidationRuleParser
.Update the illuminate validation component has been refactored on Laravel 5.4, check laravel/framework#17005 so this package's functionality depends on L5.3, and need to be updated. I'd like it if I've some time to contribute a PR, but not sure if that's possible soon. Any suggestions..?
Error Trace:
The text was updated successfully, but these errors were encountered: