I
I
Ilya Milosevic2014-05-22 15:08:00
JavaScript
Ilya Milosevic, 2014-05-22 15:08:00

How to implement an input mask for a cadastral number?

You need to implement an input mask for the cadastral number. You can read more about the cadastral number by clicking on the link . In short, the cadastral number is described by the following regular expression: /\d{2}:\d{2}:\d{1,7}:\d{1,}/ .
For me personally, the difficulty lies in the fact that the last two parts, separated by a colon, are dynamic, and so far I have no idea how to implement all this.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
V
Vladlen Grachev, 2014-05-25
@miloshilya

Make 4 inputs separated by colons. When entering the next character, check if a colon is entered. If it's a colon, cancel the input and move the focus to the next input.

A
animhotep, 2014-05-22
@animhotep

I don’t want to know what this number is)) but for customizing inputs it ’s convenient

A
Anton, 2014-05-22
@jezzit

What do you mean by "dynamic"? different number of digits allowed?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question