Skip to content
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

Validation of currency fails due to use of incorrect attribute currency instead of currencies #178

Open
Magentron opened this issue Jul 10, 2021 · 0 comments

Comments

@Magentron
Copy link

Using the default validation in Laravel for a currency I got an error while validating e.g. PLN:

        $request->validate([
            ...
            'currency'   => 'required|currencies',
            ..
        ]);

After further analysis it seems the issue is that PragmaRX\Countries\Package\Support\Collection::whereISO4217() is using the wrong attribute currency which should be currencies. After changing that the validation works.

I've created PR #177 which includes a simple test for the function.

PS: Seems to be related to PR #155

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant