Class AbstractValidatorForI18nString<T extends Annotation>

java.lang.Object
dev.orne.i18n.validation.AbstractValidatorForI18nString<T>
Type Parameters:
T - The constraint type to validate
All Implemented Interfaces:
javax.validation.ConstraintValidator<T,I18nString>
Direct Known Subclasses:
NotBlankValidatorForI18nString, NotEmptyValidatorForI18nString, PatternValidatorForI18nString, SizeValidatorForI18nString

@API(status=STABLE, since="0.1") public abstract class AbstractValidatorForI18nString<T extends Annotation> extends Object implements javax.validation.ConstraintValidator<T,I18nString>
Abstract implementation of Javax Bean Validation ConstraintValidator for I18nString instances.
Since:
0.1
Version:
1.0, 2021-02
Author:
(w) Iker Hernaez
See Also:
  • Constructor Details

    • AbstractValidatorForI18nString

      protected AbstractValidatorForI18nString()
      Creates a new instance.
  • Method Details

    • isValid

      public boolean isValid(I18nString value, @NotNull @NotNull javax.validation.ConstraintValidatorContext context)
      Specified by:
      isValid in interface javax.validation.ConstraintValidator<T extends Annotation,I18nString>
    • isTextValid

      protected abstract boolean isTextValid(@NotNull @NotNull String text)
      Validates if the text is valid.
      Parameters:
      text - The text to validate
      Returns:
      If the text is valid