New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

valour

Package Overview
Dependencies
Maintainers
1
Versions
26
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

valour - npm Package Compare versions

Comparing version 0.0.21 to 0.0.22

27

lib/ValidationUnit.js

@@ -222,2 +222,27 @@ 'use strict';

}, {
key: 'runValidationSync',
value: function runValidationSync(value, allValues, name) {
var _this3 = this;
this.value = value;
this.valid = undefined;
if (!this.shouldCheckValue(value)) {
this.valid = true;
}
var rules = this.rules.filter(function (rule) {
return !rule.isAsync;
});
rules.forEach(function (rule) {
_this3.valid = rule.func(_this3.value);
if (!_this3.valid) {
_this3.messages.push((0, _formatValidationMessage2.default)(rule.failureMessage, { name: name }));
}
});
this.setState(this.valid, this.messages);
}
}, {
key: 'getState',

@@ -257,3 +282,3 @@ value: function getState() {

this.rules = [].concat((0, _toConsumableArray3.default)(this.rules), [{ forced: forced, generator: generator, name: name, isAsync: isAsync }]);
this.rules = [].concat((0, _toConsumableArray3.default)(this.rules), [{ func: func, failureMessage: failureMessage, forced: forced, generator: generator, name: name, isAsync: isAsync }]);
return new ValidationUnit(this);

@@ -260,0 +285,0 @@ }

@@ -155,2 +155,13 @@ 'use strict';

}, {
key: 'runValidationSync',
value: function runValidationSync(name, data) {
var form = this.getForm(name);
(0, _keys2.default)(form).forEach(function (key) {
if (data[key] === undefined) {
return;
}
form[key].runValidationSync(data[key], data, key);
});
}
}, {
key: 'forceValidation',

@@ -157,0 +168,0 @@ value: function forceValidation(name, data) {

2

package.json
{
"name": "valour",
"version": "0.0.21",
"version": "0.0.22",
"description": "Simple javascript validation for any application",

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

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