Zend Zend - 7 months ago 167
HTML Question

Input field for bank account number

I need to create form input field for inputing bank account number. Than number has

= 18 number and
18 numbers.

algorithm is next (3+13+2)

So i cant use clasic input text box i need special text box where i will have slash that separates that numbers like on screenshot:

enter image description here

How can i create textbox like above using


This is very similar to this question: How to implement an input with a mask

The selected answer includes a link to a jQuery plugin that would work like this for your example:

    $("#field").mask("999 - 9999999999999 - 99");

Of course javascript can't solve everything and inputs should be validated server side as well.