[2.2][Form] add support for Length and Range constraint in ValidatorTypeGuesser

MaxLength, MinLength, Min and Max constraints are deprecated on 2.2. Will be removed in 2.3.

Add support for type guessing of Length and Range constraints.

fix #9132 on 2.2 branch