Commit 87a97cb46211f3a5ce2c180f95a78cbd32a40c9b

Authored by descipher
1 parent a1883c75

Add full Canadian postal code validation.

@@ -283,7 +283,7 @@ function Contact($compile, $templateCache) { @@ -283,7 +283,7 @@ function Contact($compile, $templateCache) {
283 "Austria": "[0-9]{4}", 283 "Austria": "[0-9]{4}",
284 "Belgium": "[0-9]{4}", 284 "Belgium": "[0-9]{4}",
285 "Brazil": "[0-9]{5}[\\-]?[0-9]{3}", 285 "Brazil": "[0-9]{5}[\\-]?[0-9]{3}",
286 - "Canada": "[A-Za-z][0-9][A-Za-z] [0-9][A-Za-z][0-9]", 286 + "Canada": "^(?!.*[DFIOQU])[A-VXY][0-9][A-Z][ -]?[0-9][A-Z][0-9]$",
287 "Denmark": "[0-9]{3,4}", 287 "Denmark": "[0-9]{3,4}",
288 "Faroe Islands": "[0-9]{3,4}", 288 "Faroe Islands": "[0-9]{3,4}",
289 "Netherlands": "[1-9][0-9]{3}\\s?[a-zA-Z]{2}", 289 "Netherlands": "[1-9][0-9]{3}\\s?[a-zA-Z]{2}",