Details |
Letzte Änderung |
Log anzeigen
| RSS feed
| Revision |
Autor |
Zeilennr. |
Zeile |
| 4 |
lars |
1 |
// Matches UK postcode. Does not match to UK Channel Islands that have their own postcodes (non standard UK)
|
|
|
2 |
$.validator.addMethod( "postcodeUK", function( value, element ) {
|
|
|
3 |
return this.optional( element ) || /^((([A-PR-UWYZ][0-9])|([A-PR-UWYZ][0-9][0-9])|([A-PR-UWYZ][A-HK-Y][0-9])|([A-PR-UWYZ][A-HK-Y][0-9][0-9])|([A-PR-UWYZ][0-9][A-HJKSTUW])|([A-PR-UWYZ][A-HK-Y][0-9][ABEHMNPRVWXY]))\s?([0-9][ABD-HJLNP-UW-Z]{2})|(GIR)\s?(0AA))$/i.test( value );
|
|
|
4 |
}, "Please specify a valid UK postcode" );
|