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
  • 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

      public boolean checkConstraint(String value)
    • getErrorMessage

      public io.vertigo.core.locale.LocaleMessageText getErrorMessage()
    • getMaxLength

      public final int getMaxLength()
      Returns:
      int Nombre maximum de caractères, de chiffres...
    • getProperty

      public final Property getProperty()
      Specified by:
      getProperty in interface Constraint<Integer,D>
    • getPropertyValue

      public final Integer getPropertyValue()
      Specified by:
      getPropertyValue in interface Constraint<Integer,D>