Releases: dtrelogan/react-formstate
showMessage prop and Redux integration
Maintenance Release
see the release notes
mainly this cleans up some of the internals of the UnitOfWork class.
getUncoercedValue
removed undocumented getUncoercedFieldState and replaced with FieldState.getUncoercedValue. i can't imagine anyone was using it yet.
added get, set, getu, setc convenience functions.
added injectModel and add to the FormState class.
documented the new FormExtension feature.
fsValidate
a single "breaking" change of note, the default 'required' function is now:
FormState.required = function(value) {
if (typeof(value) !== 'string' || value.trim() === '') { return 'Required field'; }
}
if you provide something other than a string it will fail validation.
you can suppress required validation while keeping the required tag in your jsx:
<Input required='-' fsv={v => v.minlen(1).msg('Please select a role')} />
100% coverage
add tests
move to 0.2.0:
no longer automatically bind autowired validation functions to the form component, consistent with react's behavior in es6. (validation functions are still autowired, just not bound.)
throw error objects rather than strings.