You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Would it make sense to remove the thrown DomainException when calling $form->setData() (here, here, and here) and add a validator that will check for this? Returning an accurate error message becomes very ugly when using multiple collections on one form.
From:
try{
$form->setData($data);
if($form->isValid()){
...
}else{
...
}
}catch(DomainException$e){
//If I had multiple collections, I would need to check $data to see which one caused the exception.$errors = [
'myCollection' => [
'count' => 'Some error message'
]
];
}
Can you provide a pull request that demonstrates how you'd like to consume this from a userland perspective? That may help us better understand where it's falling short, and potentially other directions for addressing it.
Would it make sense to remove the thrown DomainException when calling $form->setData() (here, here, and here) and add a validator that will check for this? Returning an accurate error message becomes very ugly when using multiple collections on one form.
From:
To:
Originally posted by @ghost at zendframework/zend-form#97
The text was updated successfully, but these errors were encountered: