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

rsuite-schema

Package Overview
Dependencies
Maintainers
2
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rsuite-schema - npm Package Compare versions

Comparing version 0.0.1-alpha.3 to 0.0.1-alpha.4

12

lib/Type.js

@@ -29,3 +29,3 @@ 'use strict';

if (!this.required && (typeof value === 'undefined' || value.length === 0)) {
if (!this.required && (typeof value === 'undefined' || value === null || value === '')) {
return { hasError: false };

@@ -50,4 +50,10 @@ }

this.required = true;
this.addValidator(function (v) {
return typeof v !== 'undefined' && v.length > 0;
this.addValidator(function (value) {
//String & Array
if (value && value.length && value.length > 0) {
return true;
}
return typeof value !== 'undefined' && value !== null;
}, errorMessage);

@@ -54,0 +60,0 @@ return this;

{
"name": "rsuite-schema",
"version": "0.0.1-alpha.3",
"version": "0.0.1-alpha.4",
"description": "Schema for data modeling & validation",

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