yiisoft / validator

Yii validator library
https://www.yiiframework.com/
BSD 3-Clause "New" or "Revised" License
110 stars 36 forks source link

Add method to merge several validation results to one #657

Closed vjik closed 2 months ago

vjik commented 4 months ago

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 commented 4 months ago

Is that common operation?

vjik commented 4 months ago

I need from two instances get one instance.

samdark commented 4 months ago
$result1->add($result2, $result3, ...)