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

Required fields not supported #68

Open
beliven-fabrizio-gortani opened this issue Feb 19, 2024 · 1 comment
Open

Required fields not supported #68

beliven-fabrizio-gortani opened this issue Feb 19, 2024 · 1 comment

Comments

@beliven-fabrizio-gortani

I am trying to integrate the select plus component into my project; however, it seems that the validation rules I have set using the rules method are not being correctly interpreted, or rather it seems that they are being completely ignored. I am attaching an example of the code:

SelectPlus::make("My roles", 'roles', Role::class)
                ->rules('required','min:1'),

when instead I select at least one option, it works successfully.

What I'm doing wrong?

@grantholle
Copy link

I've submitted a PR for adding this to the docs.

Here's how I solved it: https://github.com/grantholle/nova-select-plus/tree/validation-instructions?tab=readme-ov-file#validation

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

2 participants