All Implemented Interfaces:
TagBase, InputAttributable, Serializable, Cloneable

public class MaxLength extends AbstractAttribute implements InputAttributable
maxlength attribute for the element.
maxlength attribute for input element :-
If the value of the type attribute is text, email, search, password, tel, or url, this attribute specifies the maximum number of characters (in Unicode code points) that the user can enter; for other control types, it is ignored. It can exceed the value of the size attribute. If it is not specified, the user can enter an unlimited number of characters. Specifying a negative number results in the default behavior; that is, the user can enter an unlimited number of characters. The constraint is evaluated only when the value of the attribute has been changed.

Since:
1.0.0
See Also:
  • Field Details

  • Constructor Details

    • MaxLength

      public MaxLength()
      the default value is 524288
      Since:
      1.1.4
    • MaxLength

      public MaxLength(String value)
      Parameters:
      value - should be number
      Since:
      1.1.4
    • MaxLength

      public MaxLength(int value)
      Parameters:
      value - the value for the attribute
      Since:
      1.0.0
  • Method Details

    • setValue

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

      public int 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