I need to restrict the user and allow only first character as + or – or 0-9 and other character as 0-9..how can i do this
in regular expression validator the below expression works but i need in restrict field.
<mx:TextInput id="txtTop" restrict="[0-9+-][0-9]*$" />
Valid values are
+023
-123
23
0
invalid
+-123
fsaf
-+2132
Thanks in advance
Best Answer
Change the value of
restrict
based on the length of the string.