The formula can be of unlimited size by using the field 'Validation function' in Field Validations.
For that, enter a code starting with # in the respective control field of regcodef, e.g. #regf22, where regf22 is the field name for the Field Validation entry.