Fix error message/code for min/max string length

Min/max string length errors would return an error where the
message was in the code and code was missing.