Skip to content

Releases: josipbrcina/react-minimalistic-use-form

Add custom validation

Choose a tag to compare

@josipbrcina josipbrcina released this 03 Jun 14:29

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 validateOnMount is 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

Add custom validation Pre-release
Pre-release

Choose a tag to compare

@josipbrcina josipbrcina released this 03 Jun 13:03
2.0.0-beta.1

bump-up version to 2.0.0

Add isSubmitting

Choose a tag to compare

@josipbrcina josipbrcina released this 19 Dec 16:49

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

Choose a tag to compare

@josipbrcina josipbrcina released this 17 Dec 10:43

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

Choose a tag to compare

@josipbrcina josipbrcina released this 22 Jan 18:38
  • Rewrite the library to TypeScript
  • Add typescript types
  • Minor internal refactoring

v1.1.6

Choose a tag to compare

@josipbrcina josipbrcina released this 13 Aug 16:09
  • Increase test coverage
  • fix Form component value binding

Add tests

Choose a tag to compare

@josipbrcina josipbrcina released this 02 Jul 22:12
  • Write tests
  • Form component now "attaches" value prop to input fields

Remove dependencies

Choose a tag to compare

@josipbrcina josipbrcina released this 26 Jun 20:41

Move babel-loader to devDependencies

Add support for more input fields

Choose a tag to compare

@josipbrcina josipbrcina released this 26 Jun 19:56

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

Choose a tag to compare

@josipbrcina josipbrcina released this 26 Jun 20:05
v.1.1.3

Fix checkbox initial value for controlled checkbox input, bump versio…