That's not a must requirement, but I chose to have my GUI as restricted as possible. So user can't enter more chars than needed, can only enter digits in the port number field,...
In our case, what we can do is restrict the text field where the user provides the customer ID, so it only allows numbers. I don't have my code here, but I did something similar to this.