Digital Line Boletus Field Mask

Asked

Viewed 2,338 times

3

Would anyone know if there are any masks for the type line of billets?

I have a screen where the list of boletos of a client is displayed and I also display the entire typeable line, without points or separations, since this record comes from a webservice. And in the case of expired slips I display a link for the client to access directly the bank site and typing the line typed in the billet he can generate a billet with a new due date.

However on the bank’s website the line is separated into several fields, it is not possible to enter the number in full.

So, someone knows a library or a script that already does this conversion?

  • If you have the rule (I believe this is standardized) it should be easy pq the fields are based by length.

1 answer

4


With the plugin inputmask can create the mask by passing only the pattern, the 9 means that only numbers are accepted.

Html:

<input type="text" id="boleto"/>

javascript:

$("#boleto").inputmask({mask: '99999.99999 99999.999999 99999.999999 9 99999999999999'});

Browser other questions tagged

You are not signed in. Login or sign up in order to post.