The restrict property will only control which individual characters the textfield allows, it will not control format. So you could use it to some extent if the textfield is being filled manually by a user, to only allow numbers, colons, and APM. But it won't do anthing to help wrt the format.
As far as restricting the text to a particular format, it partly depends on when you intend to be checking for this format. If this is an input textfield, you have to have monitors set up to detect each character as it is entered to test whether it inhabits a valid position in the string. If the textfield is filled dynamically in one shot, then all 11 characters have to be examined in a similar manner as with typed entries.
Yes I meant to say it was a textinput field.
1 person found this helpful
Then you can use the restrict property to limit which characters can be entered, but you'll need to test each entry as the user makes it to make sure it is in accordance with the position of the format it is trying to fill.