Javascript Function To Check UK Postal Code

I need a javascript function that will validate a UK postal code

this one is not working...

function isValidPostal(postalCode)


var validFormat = "^(?:[A-PR-UWYZ][0-9][0-9A-HJKS-UW]?|[A-PR-UWYZ][A-HK-Y][0-9][0-9ABEHMNPRV-Y]?)\s{0,2}[0-9][ABD-HJLNP-UW-Z][ABD-HJLNP-UW-Z]|GIR\s{0,2}0AA$";

var postalRegExp = new RegExp(validFormat);

var isValid = [url removed, login to view](postalCode);

return isValid;


"SW1A 0AA" is failing

## Deliverables

1) Complete and fully-functional working program(s) in executable form as well as complete source code of all work done.

2) Deliverables must be in ready-to-run condition, as follows (depending on the nature of the deliverables):

a) For web sites or other server-side deliverables intended to only ever exist in one place in the Buyer's environment--Deliverables must be installed by the Seller in ready-to-run condition in the Buyer's environment.

b) For all others including desktop software or software the buyer intends to distribute: A software installation package that will install the software in ready-to-run condition on the platform(s) specified in this bid request.

3) All deliverables will be considered "work made for hire" under U.S. Copyright law. Buyer will receive exclusive and complete copyrights to all work purchased. (No GPL, GNU, 3rd party components, etc. unless all copyright ramifications are explained AND AGREED TO by the buyer on the site per the coder's Seller Legal Agreement).

## Platform



Habilidades: Engenharia, Javascript, MySQL, PHP, Arquitetura de software, Teste de Software, Hospedagem Web, Gestão de Site , Teste de Website

Veja mais: z-hire, test a javascript, run javascript, javascript hire, hire code, hire check, code for hire javascript, code a hire, javascript server side, web hk, code hire, UK law, hire a coder uk, code copyright, function check php, code check javascript, javascript receive package, ready javascript, javascript ready, postalcode, javascript receive, php check form complete, javascript source code, javascript platform, javascript seller

Acerca do Empregador:
( 33 comentários ) Chicago, United States

ID do Projeto: #3019341

Concedido a:


See private message.

$7 USD em 1 dia
(15 Comentários)

5 freelancers estão ofertando em média $5 para esse trabalho


See private message.

$17 USD em 1 dia
(553 Comentários)

See private message.

$8.5 USD em 1 dia
(45 Comentários)

See private message.

$4.25 USD em 1 dia
(16 Comentários)

See private message.

$4.25 USD em 1 dia
(8 Comentários)

See private message.

$3.4 USD em 1 dia
(0 Comentários)