Package dev.orne.i18n.validation
Class PatternValidatorForI18nString
java.lang.Object
dev.orne.i18n.validation.AbstractValidatorForI18nString<javax.validation.constraints.Pattern>
dev.orne.i18n.validation.PatternValidatorForI18nString
- All Implemented Interfaces:
javax.validation.ConstraintValidator<javax.validation.constraints.Pattern,
I18nString>
@API(status=INTERNAL,
since="0.1")
public class PatternValidatorForI18nString
extends AbstractValidatorForI18nString<javax.validation.constraints.Pattern>
Implementation of Javax Bean Validation
ConstraintValidator
for
Pattern
constraint on I18nString
instances.- Since:
- 0.1
- Version:
- 1.0, 2021-02
- Author:
- (w) Iker Hernaez
- See Also:
-
Pattern
I18nString
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
initialize
(@NotNull javax.validation.constraints.Pattern parameters) protected boolean
isTextValid
(@NotNull String text) Validates if the text is valid.Methods inherited from class dev.orne.i18n.validation.AbstractValidatorForI18nString
isValid
-
Constructor Details
-
PatternValidatorForI18nString
public PatternValidatorForI18nString()Creates a new instance.
-
-
Method Details
-
initialize
public void initialize(@NotNull @NotNull javax.validation.constraints.Pattern parameters) -
isTextValid
Validates if the text is valid.- Specified by:
isTextValid
in classAbstractValidatorForI18nString<javax.validation.constraints.Pattern>
- Parameters:
text
- The text to validate- Returns:
- If the text is valid
-