Package com.atlassian.jira.issue.fields
Interface TextFieldCharacterLengthValidator
- All Known Implementing Classes:
DefaultTextFieldCharacterLengthValidator
public interface TextFieldCharacterLengthValidator
Checks, whether a string's length exceeds a specific limit.
- Since:
- 5.0.3
-
Method Summary
Modifier and TypeMethodDescriptionlongReturns the maximum number of characters to be entered for a single field.booleanisTextTooLong(int length) Validate given number representing text length against the maximum number.booleanisTextTooLong(String text) Validate the length of the given string against the maximum number.
-
Method Details
-
isTextTooLong
Validate the length of the given string against the maximum number.- Parameters:
text- the text to be checked; can benull- Returns:
- whether the given text is longer than the maximum number of characters;
nullis always valid
-
isTextTooLong
@Internal boolean isTextTooLong(int length) Validate given number representing text length against the maximum number.- Parameters:
length- text length to be checked- Returns:
- whether the given number exceeds than the maximum number of characters;
-
getMaximumNumberOfCharacters
long getMaximumNumberOfCharacters()Returns the maximum number of characters to be entered for a single field.- Returns:
- the maximum number of characters to be entered for a single field.
-