-
Notifications
You must be signed in to change notification settings - Fork 52
BadMethodCallException in address creation #12
Comments
I am also facing the same issue. |
This still appears to be an issue - basically addresses can't be saved because it tries to validate the country_code field but with no method included to actually validate the country_code The only way I have been able to get around it is to manually remove the "|country" part from the validator - however this is not the best solution as the file (addresses/src/Models/Address.php) will be overwritten when running composer install or composer update Please fix this issue by adding a validator that works or removing the validation from county_codes until there is a way to validate it. edit: you can save addresses by omitting the country_code from the fields - obviously this method means the country_code isn't saved/can't be changed |
* release/v0.0.3: (31 commits) Update changelog Remove not-existing validation rule usage (fix #12) Fix minor readme typos Drop Laravel 5.5 support Update composer packages Update composer packages Add force option to artisan commands Simplify IoC binding Update minimum required PHP version Add Laravel v5.6 support Drop useless model contracts (models already swappable through IoC) Typehint void method returns Tweak composer file Require PHP 7.1.0 at least Simplify reamde Remove unused namespace Add composer dependency roave/security-advisories Add PHPUnitPrettyResultPrinter Enforce consistency Add missing composer dependencies ...
* release/v0.0.3: Update changelog Remove not-existing validation rule usage (fix #12) Fix minor readme typos
Fixed in 2986380 |
https://github.com/rinvex/addresses/blob/c3fa5351972f70da8cbe49239f4895ac8a312d9a/src/Models/Address.php#L173
Hi, I have a BadMethodCallException thrown with message "Method [validateCountry] does not exist."
Stacktrace: #69 BadMethodCallException in /var/www/vendor/laravel/framework/src/Illuminate/Validation/Validator.php:1140 #68 Illuminate\Validation\Validator:__call in /var/www/vendor/laravel/framework/src/Illuminate/Validation/Validator.php:359 #67 Illuminate\Validation\Validator:validateAttribute in /var/www/vendor/laravel/framework/src/Illuminate/Validation/Validator.php:268 #66 Illuminate\Validation\Validator:passes in /var/www/vendor/watson/validating/src/ValidatingTrait.php:395 #65 Rinvex\Addresses\Models\Address:performValidation in /var/www/vendor/watson/validating/src/ValidatingTrait.php:248 #64 Rinvex\Addresses\Models\Address:isValid in /var/www/vendor/watson/validating/src/ValidatingObserver.php:51
I'm using laravel 5.5.4
I just manually require rinvex\support package (can you fix this also?) but i have not find country rule.
I need to pass $country_code in create method.
Regards,
Vito
The text was updated successfully, but these errors were encountered: