Releases: josipbrcina/react-minimalistic-use-form
Releases · josipbrcina/react-minimalistic-use-form
Add custom validation
2.0.0
BREAKING CHANGES:
- validateForm runs validation. Previously it was just checking field errors.
- On Submit validation marks fields as touched
- On useForm mount isFormValid is not === validateOnSubmit. isFormValid will be the result of updateIsFormValid which will run when useForm mounts or it will be result of full form validation including custom validator if
validateOnMountis true - "isFieldDirtyClassName" renamed to "touchedClassName". Default value changed from 'is-dirty' to 'is-touched'
CHANGES:
- Validator plugin for custom validations
- Built-in validation debounce with auto cancellation for stale validations
- validateOnMount prop - should form run validation when it's mounted
- touched - object that contains flags if field is touched
- isTouched(name) - function that returns if field is touched
Add custom validation
2.0.0-beta.1 bump-up version to 2.0.0
Add isSubmitting
Fixed
- Fix issue where onSubmit scrolls to error for each element in the loop
Added
- isSubmitting - Boolean flag which indicates form submission state
- setIsSubmitting - Function to toggle isSubmitting flag
Plugin support
Fixed
- Default scrollToError broken on IE11 due to call element.closest()
Added
- scrollToErrorOptions - options to configure default scrollToError behaviour
- plugin support - Add support for scrollToError plugin
Typescript support
- Rewrite the library to TypeScript
- Add typescript types
- Minor internal refactoring
v1.1.6
- Increase test coverage
- fix Form component value binding
Add tests
- Write tests
- Form component now "attaches" value prop to input fields
Remove dependencies
Move babel-loader to devDependencies
Add support for more input fields
Added support for input field types:
- date
- tel
- search
- url
- color
FIXED
- Checkbox input initial value was always set to true regardless of real value true | false
Fix checkbox initial value for controlled checkbox inputs
v.1.1.3 Fix checkbox initial value for controlled checkbox input, bump versio…