public interface

TextFieldCharacterLengthValidator

com.atlassian.jira.issue.fields.TextFieldCharacterLengthValidator
Known Indirect Subclasses

Class Overview

Checks, whether a string's length exceeds a specific limit.

Summary

Public Methods
long getMaximumNumberOfCharacters()
Returns the maximum number of characters to be entered for a single field.
@Internal 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 Methods

public 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.

@Internal public boolean isTextTooLong (int length)

@Internal

This method is an internal implementation detail and will change without notice.

Clients that depend on @Internal classes and interfaces can not expect to be compatible with any version other than the version they were compiled against (even minor version and milestone releases may break binary compatibility with respect to @Internal elements).

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;

public boolean isTextTooLong (String text)

Validate the length of the given string against the maximum number.

Parameters
text the text to be checked; can be null
Returns
  • whether the given text is longer than the maximum number of characters; null is always valid