Make min/max length constraints unicode-aware so that strings containing non-ASCII characters are handled correctly.