npm i @marvinh/mobx-form-reactions

4 Versions


4 years ago

This release moves all validation logic into the Validator class. This was something that was bugging me for a while, and didn't have time to think about a proper solution for it. Thanks to a great tip by a co-worker, it is much less work than I originally anticipated.

  • Breaking: field.errors is now field.validator.errors.
  • Breaking: field._validating which is now officially part of the public api and is moved to field.validator.validating.


4 years ago
  • Prevent babel from transpiling for-of loops with generators.


4 years ago
  • Add back support for enforceActions (previously called useStrict() in mobx)
  • Add support for revisions for forms. This is great for dirty checking/syncing
  • Make validator-property on Field non-private to allow setting Validators with circular references
  • Add setter for initial-property and don't set it to false upon calling setValue. This is needed because ux requirements differ quite a bit about when a validation error should be shown to the user the first time


4 years ago

During the last year I gained a lot more experiences in dealing with complex form constructs. This release combines the new learnings and makes the library even a bit lighter.

  • Breaking: Rename package to @marvinh/mobx-form-reactions
  • Breaking: Refactor validation logic to support proper cancellation and prevent race conditions for asynchronous validations. See the Readme for more information
  • Breaking: Removed submit() in favor of a simple getter value
  • Add support for treeshaking
  • autogenerate TypeScript bindings

4 Versions

5.0.0latest4yrs ago
4.1.14yrs ago
4.1.04yrs ago
4.0.04yrs ago