[Form][Validator] fix maxLength guesser

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #9132
| License       | MIT
| Doc PR        | 

- [ ] need to add unit tests on ValidatorTypeGuesser.php