Thanks for the post. Currently there is not a way to set your own validation rules with custom fields out of the box, so you wouldn’t be able to configure rules like the length of the string or a specific format. For your purposes, you can create an integer field, which will only accept numeric values, but you wouldn’t be able to specify the length or formatting of the entered values.
It may be possible to set up a custom UI Script that will validate the content of a specific field when creating or editing a test case and inform the user that it needs to be updated. We wouldn’t be able to provide a specific example of how to set that up, but if you’d like to give that a shot I’d recommend checking out the guide on how to set up UI Scripts here: