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