All Implemented Interfaces:
TagBase, InputAttributable, Serializable, Cloneable

public class Pattern extends AbstractAttribute implements InputAttributable
pattern attribute for the element.
pattern attribute for input element :-
A regular expression that the control's value is checked against. The pattern must match the entire value, not just some subset. Use the title attribute to describe the pattern to help the user. This attribute applies when the value of the type attribute is text, search, tel, url, email or password; otherwise it is ignored. The regular expression language is the same as JavaScript's. The pattern is not surrounded by forward slashes.
Since:
1.0.0
See Also:
  • Constructor Details

    • Pattern

      public Pattern(String value)
      Parameters:
      value - the value for the attribute
      Since:
      1.0.0
  • Method Details

    • setValue

      public void setValue(String value)
      sets the value for this attribute
      Parameters:
      value - the value for the attribute.
      Since:
      1.0.0
    • setValue

      public void setValue(boolean updateClient, String value)
      sets the value for this attribute
      Parameters:
      updateClient - true to update client browser page if it is available. The default value is true but it will be ignored if there is no client browser page.
      value - the value for the attribute.
      Since:
      2.1.15
    • getValue

      public String getValue()
      gets the value of this attribute
      Returns:
      the value of the attribute
      Since:
      1.0.0
    • init

      protected void init()
      invokes only once per object
      Since:
      1.0.0
    • containsValidRegEx

      public boolean containsValidRegEx()
      checks the value in this attribute contains a valid regex.
      Returns:
      true if this attribute contains a valid regex
      Since:
      3.0.1