hmpo-form-controller
Advanced tools
Comparing version 0.2.4 to 0.2.5
@@ -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; | ||
}); | ||
}); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
62022
1527