mirror of
https://gitlab.silvrtree.co.uk/martind2000/node-validator.git
synced 2025-01-10 21:05:08 +00:00
undoing some of the optimisations
This commit is contained in:
parent
aaac571c81
commit
1e7e87a62d
@ -109,20 +109,16 @@ VALIDATE = new function() {
|
||||
var pcexp = [];
|
||||
|
||||
// BFPO postcodes
|
||||
pcexp.push(new RegExp('^(bf1)(\\s*)([0-6]{1}' + BFPOa5 + '{1}' + BFPOa6
|
||||
+ '{1})$', 'i'));
|
||||
pcexp.push(new RegExp('^(bf1)(\\s*)([0-6]{1}' + BFPOa5 + '{1}' + BFPOa6 + '{1})$', 'i'));
|
||||
|
||||
// Expression for postcodes: AN NAA, ANN NAA, AAN NAA, and AANN NAA
|
||||
pcexp.push(new RegExp('^(' + alpha1 + '{1}' + alpha2
|
||||
+ '?[0-9]{1,2})(\\s*)([0-9]{1}' + alpha5 + '{2})$', 'i'));
|
||||
pcexp.push(new RegExp('^(' + alpha1 + '{1}' + alpha2 + '?[0-9]{1,2})(\\s*)([0-9]{1}' + alpha5 + '{2})$', 'i'));
|
||||
|
||||
// Expression for postcodes: ANA NAA
|
||||
pcexp.push(new RegExp('^(' + alpha1 + '{1}[0-9]{1}' + alpha3
|
||||
+ '{1})(\\s*)([0-9]{1}' + alpha5 + '{2})$', 'i'));
|
||||
pcexp.push(new RegExp('^(' + alpha1 + '{1}[0-9]{1}' + alpha3 + '{1})(\\s*)([0-9]{1}' + alpha5 + '{2})$', 'i'));
|
||||
|
||||
// Expression for postcodes: AANA NAA
|
||||
pcexp.push(new RegExp('^(' + alpha1 + '{1}' + alpha2 + '{1}' + '?[0-9]{1}'
|
||||
+ alpha4 + '{1})(\\s*)([0-9]{1}' + alpha5 + '{2})$', 'i'));
|
||||
pcexp.push(new RegExp('^(' + alpha1 + '{1}' + alpha2 + '{1}' + '?[0-9]{1}' + alpha4 + '{1})(\\s*)([0-9]{1}' + alpha5 + '{2})$', 'i'));
|
||||
|
||||
// Exception for the special postcode GIR 0AA
|
||||
pcexp.push(/^(GIR)(\s*)(0AA)$/i);
|
||||
|
Loading…
Reference in New Issue
Block a user