public static Validator<CharSequence> maxLength(@NonNull final CharSequence errorMessage,
                                                    final int maxLength) {
        return new MaxLengthValidator(errorMessage, maxLength);
    }
public static Validator < CharSequence > maxLength ( @ NonNull final CharSequence errorMessage , final int maxLength ) { return new MaxLengthValidator ( errorMessage , maxLength ) ; }
Creates and returns a validator, which allows to validate texts to ensure, that they are not
longer than a specific length.

@param errorMessage
The error message, which should be shown, if the validation fails, as an instance of
the type {@link CharSequence}. The error message may not be null
@param maxLength
The maximum length a text may have as an {@link Integer} value. The maximum length
must be at least 1
@return The validator, which has been created, as an instance of the type {@link Validator}