public class DefaultTextFieldCharacterLengthValidator extends Object implements TextFieldCharacterLengthValidator
Constructor and Description |
---|
DefaultTextFieldCharacterLengthValidator(TextFieldLimitProvider textFieldLimitProvider) |
Modifier and Type | Method and Description |
---|---|
long |
getMaximumNumberOfCharacters()
Returns the maximum number of characters to be entered for a single field.
|
boolean |
isTextTooLong(int length)
Validate given number representing text length against the maximum number.
|
boolean |
isTextTooLong(String text)
Validate the length of the given string against the maximum number.
|
public DefaultTextFieldCharacterLengthValidator(TextFieldLimitProvider textFieldLimitProvider)
public boolean isTextTooLong(String text)
TextFieldCharacterLengthValidator
isTextTooLong
in interface TextFieldCharacterLengthValidator
text
- the text to be checked; can be null
null
is always validpublic boolean isTextTooLong(int length)
TextFieldCharacterLengthValidator
isTextTooLong
in interface TextFieldCharacterLengthValidator
length
- text length to be checkedpublic long getMaximumNumberOfCharacters()
TextFieldCharacterLengthValidator
getMaximumNumberOfCharacters
in interface TextFieldCharacterLengthValidator
Copyright © 2002-2018 Atlassian. All Rights Reserved.