Jump to content

Post code


yogibear

Recommended Posts

Well, I thought it was out of my league but I managed to get an alert box to display if the post code doesn’t contain a space. This will only happen if the country is set to GB so it doesn’t affect other counties post/area codes. I am now going to try and get it to put a space in, if one hasn’t been entered.

 

Best wishes

Yogi

Link to comment
Share on other sites

Well, I thought it was out of my league but I managed to get an alert box to display if the post code doesn’t contain a space. This will only happen if the country is set to GB so it doesn’t affect other counties post/area codes. I am now going to try and get it to put a space in, if one hasn’t been entered.

 

Best wishes

Yogi

 

if gb

remove spaces

check length >= 5 and <=8

capitalise

insert space at 3 before the end

so works for

rm12 4pq

rm1 4ax

e1 7ey

ec2r 8jr

job done :)

 

or you could use the top google result ...

http://javascript.internet.com/forms/uk-postcode-validation.html

Link to comment
Share on other sites

  • 1 month later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated