Skip to content
This repository was archived by the owner on Aug 23, 2022. It is now read-only.

React Redux Form v1.2.4

Compare
Choose a tag to compare
@davidkpiano davidkpiano released this 16 Nov 15:29
· 558 commits to master since this release

Fixes and Enhancements

  • There is progress being made on removing redux-thunk as a peer dependency! A related bug involving toggling checkboxes without redux-thunk was fixed: #534
  • If a field doesn't exist, RRF will now handle it properly instead of throwing frequent errors. #529
  • The latest version of Lodash (as of 4.17.x) introduced some gnarly bugs with _.omit. I replaced it with a much simpler implementation (since it's only being used internally) to mitigate those issues. #535
  • Some enhancements were made internally inside <Form> to greatly simplify how validators and error validators are validated, including avoiding unnecessary function calls.
  • 🆕 You can now validate individual nested models inside the <Form validators={{...}}> prop! Read the updated docs under the "Deep model validation in <Form>" section. Here's what it looks like:
// Suppose you have a store with this 'user' model:
// {
//   name: 'Bob',
//   phones: [
//     { type: 'home', number: '5551231234' },
//     { type: 'cell', number: '5550980987' },
//   ],
// }

// You can validate each individual phone number like so:
<Form
  model="user"
  validators={{
    'phones[].number': (value) => value && value.length === 10,
  }}
>
  {/* etc. */}
</Form>