validation in reducer in redux

Viewed 4455

this question is about where to put validation of an form element in redux. I feeeeel as though I should have an onValueChange event that dispatches an action to the reducer that validates and updates both the value ( invalid or valid as it may be ) as well as the "isValid" property on state so that that element can then display an error.

Conversely, I could do the validation in the action, and if it fails just dispatch a failure action instead.

One note is that i do prefer the anonymous function nomenclature to extending the react.component.

I guess I should change then name of this to where is the proper place to put validation in the redux flow.

1 Answers
Related