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

2valid

Package Overview
Dependencies
Maintainers
1
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

2valid - npm Package Compare versions

Comparing version 2.2.2 to 2.2.3

12

index.js

@@ -112,4 +112,6 @@ /*!

function validateObjectEntity ( modelObject, entity, parents, errors ) {
if( !errors ) errors = {};
if( !parents ) parents = [];
if(!errors) errors = {};
if(!errors.text) errors.text = [];
if(!parents) parents = [];
for( var key in entity ){

@@ -120,5 +122,2 @@ var fieldName = parents + '.' + key;

errors.notRequired.push(fieldName);
if(!errors.text) errors.text = [];
errors.text.push('Field ' + fieldName + ' not required');

@@ -131,4 +130,2 @@ }

if(!errors.notMatched) errors.notMatched = {};
if(!errors.text) errors.text = [];
errors.notMatched[fieldName] = modelObject[key].type;

@@ -161,2 +158,3 @@ errors.text.push('Field ' + fieldName + ' not matched with type ' + modelObject[key].type);

);
if(!errors.text[0]) errors = {};
if(errors && errors.text) errors.text = errors.text.join('. ');

@@ -163,0 +161,0 @@

{
"name": "2valid",
"version": "2.2.2",
"version": "2.2.3",
"description": "JavaScript simple data validator",

@@ -5,0 +5,0 @@ "main": "index.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