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

hmpo-form-controller

Package Overview
Dependencies
Maintainers
3
Versions
30
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hmpo-form-controller - npm Package Compare versions

Comparing version 0.2.4 to 0.2.5

2

lib/validation/validators.js

@@ -95,5 +95,5 @@ var moment = require('moment');

postcode: function postcode(value) {
return value === '' || Validators.regex(value, /^([GIR] ?0[A]{2})|((([A-Z][0-9]{1,2})|(([A-Z][A-HJ-Y][0-9]{1,2})|(([A-Z][0-9][A-Z])|([A-Z][A-HJ-Y][0-9]?[A-Z])))) ?[0-9][A-Z]{2})$/i);
return value === '' || Validators.regex(value, /^(([GIR] ?0[A]{2})|((([A-Z][0-9]{1,2})|(([A-Z][A-HJ-Y][0-9]{1,2})|(([A-Z][0-9][A-Z])|([A-Z][A-HJ-Y][0-9]?[A-Z])))) ?[0-9][A-Z]{2}))$/i);
}
};
{
"name": "hmpo-form-controller",
"version": "0.2.4",
"version": "0.2.5",
"description": "",

@@ -33,3 +33,3 @@ "main": "index.js",

"mocha": "^2.1.0",
"postcode": "^0.2.2",
"postcode": "0.2.2",
"reqres": "^1.1.1",

@@ -36,0 +36,0 @@ "sinon": "^1.12.2",

@@ -37,2 +37,9 @@ var Validators = require('../../').validators;

it('correctly rejects invalid postcodes', function () {
Validators.postcode('A11AA A11AA').should.not.be.ok;
Validators.postcode('N443 6DFG').should.not.be.ok;
});
});
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