Home » Javascript » Auto generate space in uk postcodes using jquery

Auto generate space in uk postcodes using jquery

Posted by: admin August 19, 2018 Leave a comment

Questions:

Is there any way when user typing a UK postcodes in input field then generate auto space between string with respect to UK postcodes.

If user type in input field

CB30QB becomes CB3 0QB
N12NL becomes N1 2NL
CB249LQ becomes CB24 9LQ
OX144FB becomes OX1 44FB
OX145FB becomes OX14 5FB

I am trying like this way

Fiddle Demo

Answers: