Package io.vertigo.basics.constraint
Class ConstraintStringLength
java.lang.Object
io.vertigo.basics.constraint.ConstraintStringLength
- All Implemented Interfaces:
Constraint<Integer,String>
Contrainte pour gérer la longueur des chaines de caractères.
- Author:
- plepaisant
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleancheckConstraint(String value) io.vertigo.core.locale.LocaleMessageTextfinal intfinal Propertyfinal Integer
-
Constructor Details
-
ConstraintStringLength
public ConstraintStringLength(String args, Optional<String> overrideMessageOpt, Optional<String> overrideResourceMessageOpt) - Parameters:
args- Liste des arguments réduite à un seul castable en integer. Cet argument correspond au nombre de caractères maximum authorisés sur la chaine de caractères.
-
-
Method Details
-
checkConstraint
-
getErrorMessage
public io.vertigo.core.locale.LocaleMessageText getErrorMessage() -
getMaxLength
public final int getMaxLength()- Returns:
- int Nombre maximum de caractères, de chiffres...
-
getProperty
- Specified by:
getPropertyin interfaceConstraint<Integer,D>
-
getPropertyValue
- Specified by:
getPropertyValuein interfaceConstraint<Integer,D>
-