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 for HasMany Relation not working properly #116

Open
sagadsalem opened this issue Mar 25, 2023 · 2 comments
Open

Validation for HasMany Relation not working properly #116

sagadsalem opened this issue Mar 25, 2023 · 2 comments

Comments

@sagadsalem
Copy link

On the following code. I am using hasMany with inline relation. But when I add validation on fields in "ProductAddons". It is not working.

// Bundle Resource
HasMany::make('Addons', 'addons',
\App\Nova\ProductAddons::class)
->inline(),

//BundlePublications Resource
Number::make('Price', 'qty')->rules('required'),

is anything wrong or it's some kind of bug?

@harrysbaraini
Copy link
Member

@sagadsalem What nova version are you using? It seems that depending on the Nova version, NovaRequest was split in multiple Request classes so we can't use app(NovaRequest::class) and get if it is an update or create action.

@kennethtomagan
Copy link

I encounter same issue, using nova 4.

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

3 participants