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

Failed Validation rules not showing on validation object passed to onValidation/Validating #70

Open
toddvalentine opened this issue Jun 29, 2017 · 1 comment

Comments

@toddvalentine
Copy link

toddvalentine commented Jun 29, 2017

If a Photo model that extends from the Decoy Base model and uses HasImages fails dimension validation, I would like to prevent the model from being created.

I have tried to extend the onValidating and onValidation methods and conditionally check for failed/fails on the Illuminate\Validation\Validator object passed as the argument to these methods, but I am not seeing any failed rules.

Should the failed dimensions rules be available via failed in this instance?

@toddvalentine
Copy link
Author

toddvalentine commented Jun 29, 2017

looks like by the time we fail validation model is set to Image, so onValidating on my Photo model is never called. Can't seem to find a way to go back once Image has failed validation and delete the related model.

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