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

React Redux Form v0.14.5

Compare
Choose a tag to compare
@davidkpiano davidkpiano released this 31 Aug 16:08
· 1039 commits to master since this release

Fixes and Improvements

  • Error messages in <Errors messages={{...}}> can now be customized via a function that takes in the model value and the error (#347):
        <form>
          <Errors model="test.foo"
                  messages={{
                    length: (val, {length}) => `${val && val.length} chars is too short (must be at least ${length} chars)`,
                  }}
          />
          <Field model="test.foo"
                 errors={{
                   length: (v) => v && v.length && v.length > 5 ? false : {length: 5},
                 }}
          >
            <input type="text" />
          </Field>
        </form>
  • Props in Field are now whitelisted instead of blacklisted when passing props to the internal Control component: #349
  • The parse function in <Field> is now called for the initial value, if it is different than the initial value. #379