Label text

How to restrict the label such that its doesn’t take character as input . only takes digits .

RTFM.
You probably want to read TextEditor first.