qiniu / formstate-x

Manage state of form with ease.
https://qiniu.github.io/formstate-x
MIT License
34 stars 10 forks source link

Separate FormState's own error from mixed error #38

Closed nighca closed 3 years ago

nighca commented 3 years ago

It's necessary when form state bound to a FormItem-like compoent. It should display its own error, instead of mixed error, coz fields' error could be alreay bound to a child FormItem-like component.

<FormItem label="foo" {...bindFormItem(stateFoo)}> // we should bind stateFoo's own error here
  <FormItem label="foo.bar" {...bindFormItem(stateFoo.$.bar)}>
    {...}
  </FormItem>
</FormItem>