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

@expandorg/validation

Package Overview
Dependencies
Maintainers
3
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@expandorg/validation - npm Package Compare versions

Comparing version 0.2.5 to 0.2.6

6

package.json
{
"name": "@expandorg/validation",
"version": "0.2.5",
"version": "0.2.6",
"description": "Expand UI validation library",

@@ -17,5 +17,5 @@ "main": "index.js",

"dependencies": {
"validator": "^10.9.0"
"validator": "^11.1.0"
},
"gitHead": "14a9fc49f391eebb06f22532147de5abda332ff9"
"gitHead": "7acda91bb9dfad9c96a362edeb0d0122e0319b3c"
}
// @flow
const validateField = (fieldValue: any, fieldRules: Array<any> | Object) => {
const failedRule = fieldRules.find(rule => {
const [fn, ...args] = rule;
const failed = fieldRules.find(rule => {
// eslint-disable-next-line no-unused-vars
const [fn, message, ...args] = rule;
return !fn(fieldValue, ...args);
});
return failedRule ? failedRule[1] : null;
return failed ? failed[1] : null;
};
export default validateField;
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