Class AlphaPatternConstraint

All Implemented Interfaces:
Serializable, Cloneable, Copyable, DictionaryBean, Constraint

public class AlphaPatternConstraint extends AllowCharacterConstraint
Pattern for matching alpha characters
Author:
Kuali Rice Team (rice.collab@kuali.org)
See Also:
  • Field Details

    • lowerCase

      protected boolean lowerCase
    • upperCase

      protected boolean upperCase
  • Constructor Details

    • AlphaPatternConstraint

      public AlphaPatternConstraint()
  • Method Details

    • getRegexString

      protected String getRegexString()
      This method returns a string representing a regex with characters to match, this string should not include the start(^) and end($) symbols or any length related symbols (*, {0,}, etc)
      Specified by:
      getRegexString in class ValidCharactersPatternConstraint
      Returns:
      regular expression
    • getMessageKey

      public String getMessageKey()
      A message key is auto generated for this bean if none is set. This generated message can be overridden through setMessageKey, but the generated message should cover most cases.
      Overrides:
      getMessageKey in class BaseConstraint
      Returns:
      String message key
      See Also:
    • isLowerCase

      public boolean isLowerCase()
      Returns:
      the lowerCase
    • setLowerCase

      public void setLowerCase(boolean lowerCase)
      Only allow lowerCase characters. DO NOT use with upperCase option, no flags set for case means both upper and lower case are allowed.
      Parameters:
      lowerCase - the lowerCase to set
    • isUpperCase

      public boolean isUpperCase()
    • setUpperCase

      public void setUpperCase(boolean upperCase)
      Only allow upperCase characters. DO NOT use with lowerCase option, no flags set for case means both upper and lower case are allowed.
      Parameters:
      upperCase - the lowerCase to set