fix(input): format as string before running minlength/maxlength formatters

Previously, minlength/maxlength would not work correctly when dealing with
non-string model values.

A better fix for this has already been implemented in 1.3, but unfortunately
implementing that fix in 1.2 is a bit harder as it requires a number of
commits to be backported in order to solve the problem correctly.

Closes #5936