-1

I want to restrict my users in the textinput so that they can edit number's with percentage symbol in the end. Rightnow they are only restricted to enter numbers in decimals. How do I let them restrict to have percentage symbol? I am doing this restrict='0-9\.\-'. I appreciate your help. Thanks.

1 Answers1

0

you can add the % symbol to the restrict values.

restrict='0-9\.\-\%'

not sure if you need to escape it with the slash or not. If you want to restrict the percent to the last position in the text, you will have listen for the change or valueCommit event to validate and format the data the way you need it.

jhinkley
  • 668
  • 4
  • 10