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

Fixed issue with update rules not using existing resource #154

Conversation

marcoboers
Copy link
Contributor

@marcoboers marcoboers commented Jul 9, 2021

This PR fixes an issue with the update rules when using the TabsOnEdit trait on a resource.
The TabsOnEdit trait currently breaks validation rules that rely on the model when updating the model.

Example of a case that is fixed by this PR:

Text::make(__('Number'),  'number')
    ->rules([
        'required', 
        'integer', 
        Rule::unique('modules')
            ->ignoreModel($this->resource),
    ]),

@RVxLab RVxLab merged commit 403312f into eminiarts:master Jul 9, 2021
@RVxLab
Copy link
Collaborator

RVxLab commented Jul 9, 2021

Thanks for the PR, much appreciated!

I'll tag a release tonight.

@marcoboers
Copy link
Contributor Author

Thank you for your fast response!

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

Successfully merging this pull request may close these issues.

2 participants