Class NotEmptyValidatorForI18nString

java.lang.Object
dev.orne.i18n.validation.AbstractValidatorForI18nString<javax.validation.constraints.NotEmpty>
dev.orne.i18n.validation.NotEmptyValidatorForI18nString
All Implemented Interfaces:
javax.validation.ConstraintValidator<javax.validation.constraints.NotEmpty,I18nString>

@API(status=INTERNAL, since="0.1") public class NotEmptyValidatorForI18nString extends AbstractValidatorForI18nString<javax.validation.constraints.NotEmpty>
Implementation of Javax Bean Validation ConstraintValidator for NotEmpty constraint on I18nString instances.
Since:
0.1
Version:
1.0, 2021-02
Author:
(w) Iker Hernaez
See Also:
  • Constructor Details

    • NotEmptyValidatorForI18nString

      public NotEmptyValidatorForI18nString()
      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<javax.validation.constraints.NotEmpty,I18nString>
      Overrides:
      isValid in class AbstractValidatorForI18nString<javax.validation.constraints.NotEmpty>
    • isTextValid

      protected boolean isTextValid(@NotNull @NotNull String text)
      Validates if the text is valid.
      Specified by:
      isTextValid in class AbstractValidatorForI18nString<javax.validation.constraints.NotEmpty>
      Parameters:
      text - The text to validate
      Returns:
      If the text is valid