Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

formstate

Package Overview
Dependencies
Maintainers
2
Versions
38
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

formstate - npm Package Compare versions

Comparing version 1.1.1 to 1.2.0

3

CHANGELOG.md

@@ -0,1 +1,4 @@

# 1.2.0
* `enableAutoValidation` `enableAutoValidationAndValidate` `disableAutoValidation` functions on `FormState` should consistently always toggle the `autoValidation` state for *both* itself and its children. [ref](https://github.com/formstate/formstate/issues/67)
# 1.1.1

@@ -2,0 +5,0 @@ * If a validator dies unexpectedly (throws an error/exception) the `validate` call does the same instead of silently ignoring it. Should not cause any change if your validators worked previously.

2

CONTRIBUTING.md

@@ -16,2 +16,2 @@ # Setup

* Commit all your changes (including changelog)
* Run `npm version major|minor|patch`. It will automatically push to bamboo and bamboo will pulish to nexus.
* Run `npm version major|minor|patch`. It will automatically push to github, and travis will publish to npm.

@@ -94,3 +94,3 @@ "use strict";

this.enableAutoValidationAndValidate = function () {
_this.autoValidationEnabled = true;
_this.enableAutoValidation();
return _this.validate();

@@ -100,2 +100,3 @@ };

_this.autoValidationEnabled = false;
_this.getValues().forEach(function (x) { return x.disableAutoValidation(); });
};

@@ -102,0 +103,0 @@ /**

@@ -24,2 +24,3 @@ import { Validatable, Validator } from './types';

enableAutoValidation: () => void;
disableAutoValidation: () => void;
protected _error: string | null | undefined;

@@ -26,0 +27,0 @@ /**

@@ -68,2 +68,5 @@ "use strict";

};
this.disableAutoValidation = function () {
_this.getFields().forEach(function (x) { return x.disableAutoValidation(); });
};
this._error = '';

@@ -211,2 +214,5 @@ }

__decorate([
mobx_1.action
], FormStateLazy.prototype, "disableAutoValidation", void 0);
__decorate([
mobx_1.observable

@@ -213,0 +219,0 @@ ], FormStateLazy.prototype, "_error", void 0);

@@ -31,2 +31,3 @@ /** A truthy string or falsy values */

enableAutoValidation: () => void;
disableAutoValidation: () => void;
}

@@ -33,0 +34,0 @@ /**

{
"name": "formstate",
"version": "1.1.1",
"version": "1.2.0",
"description": "Painless and simple MobX form management",

@@ -5,0 +5,0 @@ "main": "./lib/index.js",

@@ -164,3 +164,3 @@ import { action, computed, isArrayLike, isObservable, observable, runInAction } from 'mobx';

@action public enableAutoValidationAndValidate = () => {
this.autoValidationEnabled = true;
this.enableAutoValidation();
return this.validate();

@@ -170,2 +170,3 @@ }

this.autoValidationEnabled = false;
this.getValues().forEach(x => x.disableAutoValidation());
}

@@ -172,0 +173,0 @@

@@ -61,2 +61,5 @@ import { observable, action, computed, runInAction } from 'mobx';

}
@action disableAutoValidation = () => {
this.getFields().forEach(x => x.disableAutoValidation());
}

@@ -63,0 +66,0 @@

@@ -80,2 +80,3 @@ import { isPromiseLike } from "../internal/utils"

enableAutoValidation: () => void;
disableAutoValidation: () => void;
}

@@ -82,0 +83,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc