How can I ensure that the council tax account number provided is valid?
There are three settings specific to this which can be accessed in System Management > Settings (then choose the form):
1) CTaxAccountMinLength - you can state a minimum length which needs to be a number e.g. 6
2) CTaxAccountMaxLength? - you can state a minimum length which needs to be a number e.g. 13
3) CTaxAccountRegExPattern - you can stipulate the exact format using a regular expression. Regular expressions can be simple and complex. Examples below:
a) Council Tax number must start with a 8, contain only numbers and be 8 digits long:
^8[0-9]{7}$
b) Council Tax number must start with a 4, contain only numbers and be 8 digits long, or can start with 4, contain numbers but end in an X:
^4[0-9]{7}$|^4[0-9]{6}X$
c) Council tax account number can start with a 4 but in that case must be a maximum of 9 digits long and can end in an X. Or it can start with a 7 or an 8 but in that case must be a maximum of 8 digits long but can end in an X:
^4[0-9]{8}$|^4[0-9]{7}X$|^[78][0-9]{7}$|^[78][0-9]{6}X$