Package io.vertigo.basics.constraint
Class ConstraintStringLength
- java.lang.Object
-
- io.vertigo.basics.constraint.ConstraintStringLength
-
- All Implemented Interfaces:
Constraint<Integer,String>
public final class ConstraintStringLength extends Object
Contrainte pour gérer la longueur des chaines de caractères.- Author:
- plepaisant
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
checkConstraint(String value)
io.vertigo.core.locale.MessageText
getErrorMessage()
int
getMaxLength()
Property
getProperty()
Integer
getPropertyValue()
-
-
-
Constructor Detail
-
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 Detail
-
checkConstraint
public boolean checkConstraint(String value)
-
getErrorMessage
public io.vertigo.core.locale.MessageText getErrorMessage()
-
getMaxLength
public final int getMaxLength()
- Returns:
- int Nombre maximum de caractères, de chiffres...
-
getProperty
public final Property getProperty()
- Specified by:
getProperty
in interfaceConstraint<Integer,D>
-
getPropertyValue
public final Integer getPropertyValue()
- Specified by:
getPropertyValue
in interfaceConstraint<Integer,D>
-
-