max length validation for legal costs