To validate a text field against a specific rule you can use custom validation in form of regular expression encapsulated in slashes.
For example, to only accept numeric values you would enter something like: /^[0-9]+$/ in the "Regex" field.
If you want your field to be 3 digits like "123", and validated against that, you would enter: /^[0-9]{3}$/
To accept a code beginning with a letter, followed by 6 digits you would use: /^[A-Z][0-9]{6}$/i
More info on regular expressions can be found here.
Please be careful with this feature as entering the wrong regular expression may break the registration functinality. Do not test on the live site.
Also note that compiling a regular expression for your needs does not go under regular support. If you need our help on this it will be charged as custom work.