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

fix: small error in delete validation #1816

Open
wants to merge 1 commit into
base: 3.1
Choose a base branch
from

Conversation

mrossard
Copy link

The code in current version doesn't work and does nothing with the validation results.

The code in current version doesn't work and does nothing with the validation results.
$validationErrors = $this->validator->validate($data, groups: ['deleteValidation']]);
if($validationErrors->count() > 0) {
//trigger some error / throw some exception...for example
throw new ConflictHttpException($errors->get(0)->getMessage());
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you throw a validation exception? there should be an example in our ValidateProvider

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