Package dev.orne.i18n.validation
Class NotBlankValidatorForI18nString
java.lang.Object
dev.orne.i18n.validation.AbstractValidatorForI18nString<javax.validation.constraints.NotBlank>
dev.orne.i18n.validation.NotBlankValidatorForI18nString
- All Implemented Interfaces:
javax.validation.ConstraintValidator<javax.validation.constraints.NotBlank,
I18nString>
@API(status=INTERNAL,
since="0.1")
public class NotBlankValidatorForI18nString
extends AbstractValidatorForI18nString<javax.validation.constraints.NotBlank>
Implementation of Javax Bean Validation
ConstraintValidator
for
NotBlank
constraint on I18nString
instances.- Since:
- 0.1
- Version:
- 1.0, 2021-02
- Author:
- (w) Iker Hernaez
- See Also:
-
NotBlank
I18nString
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
isTextValid
(@NotNull String text) Validates if the text is valid.boolean
isValid
(I18nString value, javax.validation.ConstraintValidatorContext context) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface javax.validation.ConstraintValidator
initialize
-
Constructor Details
-
NotBlankValidatorForI18nString
public NotBlankValidatorForI18nString()Creates a new instance.
-
-
Method Details
-
isValid
- Specified by:
isValid
in interfacejavax.validation.ConstraintValidator<javax.validation.constraints.NotBlank,
I18nString> - Overrides:
isValid
in classAbstractValidatorForI18nString<javax.validation.constraints.NotBlank>
-
isTextValid
Validates if the text is valid.- Specified by:
isTextValid
in classAbstractValidatorForI18nString<javax.validation.constraints.NotBlank>
- Parameters:
text
- The text to validate- Returns:
- If the text is valid
-