It requires customization. E.g., you could use JavaScript code to listens for the input event on the custom attribute input field and check the input value against a regular expression.
Alternately, if the 'list of valid numbers' is small, you could instead use a drop down type control.