Numeric only text field in perspective

I am working on a small perspective project to allow end users to update their pin for our proximity access system. The pins can be varying length and can start with zero. Ideally the “submit” button would be disabled until a valid pin is entered.
I tried using toint() in an expression binding, but it will return true as long as the first digit is numeric. I also tried using isdigit() in an event script binding, but could not get it to work.

Any advice would be much appreciated.

You probably have to use a script transform and use the isnumeric() python function to check.

Thanks nminchin, that did it.