The basic filter checks the minimum and maximum field size based on the textual representation and real content of the field, respectively.
That means, minimum field size will be checked against the readable characters, which is the ideal scenario from a user perspective. Maximum field size, ideally, would also be checked against readable characters, however, database fields are not infinite so it makes sense that the check is done against the full content, and not just the text.
This is the method that turns user input into the textual representation.