This repository was archived by the owner on Aug 23, 2022. It is now read-only.
React Redux Form v0.14.5
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>