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

m-validate

Package Overview
Dependencies
Maintainers
1
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

m-validate - npm Package Compare versions

Comparing version 1.0.2 to 1.0.5

2

package.json
{
"name": "m-validate",
"version": "1.0.2",
"version": "1.0.5",
"description": "NodeJS simple validation functions",

@@ -5,0 +5,0 @@ "main": "m-validate.js",

@@ -227,3 +227,3 @@ /* eslint-env jasmine */

password: "1234",
userNumericFloat: "1,234-"
userNumericFloat: "(1,234)"
};

@@ -230,0 +230,0 @@

@@ -297,3 +297,3 @@ /* eslint-env jasmine */

it('should respond with success for url type (without http)', function() {
it('should respond with error for url type (without http)', function() {
var content = {

@@ -305,4 +305,4 @@ password: "1234",

var result = validate(content, definitionFields);
expect(result.error).toBe(false);
expect(result.result.siteaddress).toEqual({});
expect(result.error).toBe(true);
expect(result.result.siteaddress.type).toBe('not_an_url');
});

@@ -309,0 +309,0 @@

@@ -56,3 +56,3 @@ /* eslint no-control-regex: [0] */

case "url":
var url = /\(?(?:(http|https|ftp):\/\/)?(?:((?:[^\W\s]|\.|-|[:]{1})+)@{1})?((?:www.)?(?:[^\W\s]|\.|-)+[\.][^\W\s]{2,4}|localhost(?=\/)|\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})(?::(\d*))?([\/]?[^\s\?]*[\/]{1})*(?:\/?([^\s\n\?\[\]\{\}#]*(?:(?=\.)){1}|[^\s\n\?\[\]\{\}\.#]*)?([\.]{1}[^\s\?#]*)?)?(?:\?{1}([^\s\n#\[\]]*))?([#][^\s\n]*)?\)?/i;
var url = /\(?(?:(http|https|ftp):\/\/){1}(?:((?:[^\W\s]|\.|-|[:]{1})+)@{1})?((?:www.)?(?:[^\W\s]|\.|-)+[\.][^\W\s]{2,4}|localhost(?=\/)|\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})(?::(\d*))?([\/]?[^\s\?]*[\/]{1})*(?:\/?([^\s\n\?\[\]\{\}#]*(?:(?=\.)){1}|[^\s\n\?\[\]\{\}\.#]*)?([\.]{1}[^\s\?#]*)?)?(?:\?{1}([^\s\n#\[\]]*))?([#][^\s\n]*)?\)?/i;

@@ -59,0 +59,0 @@ if (!url.test(theData)) {

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