zendframework / zend-inputfilter

InputFilter component from Zend Framework
BSD 3-Clause "New" or "Revised" License
64 stars 50 forks source link

Delegate to InputInterface::isValid when data not exists #30

Closed Maks3w closed 9 years ago

Maks3w commented 9 years ago

This change is BC compatible with #10. Both depends of the specific subclass Input

About #7 there is things for to discuss if this is BC break or not.

Basically the question to discuss it's if InputInterface::isValid() should be the responsible to decide all cases where an input is invalid or if we want BaseInputFilter to decide that. Note I used here BaseInputFilter and not InputFilterInterface because only that class had so many matches about the InputInterface|Input state.

Revert interpretation of #22 change on merge

Supersede and close #29

Maks3w commented 9 years ago

At this moment this pending of discussion.

TODO remove tests from BaseInputFilter and place it on Input

weierophinney commented 9 years ago

This looks sane; please rebase and proceed, and let me know when you're ready for final review.

Maks3w commented 9 years ago

@weierophinney This become broken due the assumption of fallback values for missing data does not add the input to the valid inputs collection.

Maks3w commented 9 years ago

@weierophinney This undo the change on #22 while merging. Fallback value shouldn't never to be exposed and used for build validation rules.