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

Add method to merge several validation results to one #657

Closed
vjik opened this issue Feb 20, 2024 · 3 comments · Fixed by #686
Closed

Add method to merge several validation results to one #657

vjik opened this issue Feb 20, 2024 · 3 comments · Fixed by #686
Assignees
Labels
type:feature New feature
Milestone

Comments

@vjik
Copy link
Member

vjik commented Feb 20, 2024

I see two ways.

  1. Create static merger: ValidationResult::merge($result1, $result2, ...)

  2. Add method that add errors from another result: $result1->addResult($result2, $result3, ...)

@samdark
Copy link
Member

samdark commented Feb 20, 2024

Is that common operation?

@vjik
Copy link
Member Author

vjik commented Feb 20, 2024

I need from two instances get one instance.

@samdark
Copy link
Member

samdark commented Feb 20, 2024

$result1->add($result2, $result3, ...)

@arogachev arogachev self-assigned this Apr 4, 2024
@arogachev arogachev added the type:feature New feature label Apr 4, 2024
@arogachev arogachev added this to the 1.4 milestone Apr 4, 2024
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:feature New feature
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants