You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thank you for your work on this package.
I have a question on the validation rules that I don't seem to get working. It looks like the validation rules are not yet loaded before you load app('pragmarx.countries'); explicitly. After that the validation does work correctly.
Version "pragmarx/countries-laravel" === '0.6.3'
Example steps to reproduce the error
classPostControllerextendsController
public functionstore(Request$request)
{
// Without this the 'cca2' validation rule gives error. Please toggle on/off.$foo = app('pragmarx.countries');
$validated = $this->validate($request, [
'country_code' => 'nullable|string|size:2|cca2',
];
dd($validated);
}
The error I get when the rule is not loaded:
Method Illuminate\Validation\Validator::validateCca2 does not exist.
Perhaps this has something to do with the defered state in \PragmaRX\CountriesLaravel\Package\ServiceProvider ?
The text was updated successfully, but these errors were encountered:
Hi @antonioribeiro ,
Thank you for your work on this package.
I have a question on the validation rules that I don't seem to get working. It looks like the validation rules are not yet loaded before you load
app('pragmarx.countries');
explicitly. After that the validation does work correctly.Version "pragmarx/countries-laravel" === '0.6.3'
Example steps to reproduce the error
The error I get when the rule is not loaded:
Perhaps this has something to do with the
defered
state in\PragmaRX\CountriesLaravel\Package\ServiceProvider
?The text was updated successfully, but these errors were encountered: