fix(input): validate minlength/maxlength for non-string values

Use viewValue for minlength/maxlength validation if model value is not a
string. This allows ngMinlength and ngMaxlength to be used for number inputs.

Closes #7967