TRUNK-2660 Validate field lengths (with unit test)