Class ValidateElement.RangeValidateElement

java.lang.Object
org.jivesoftware.smackx.xdatavalidation.packet.ValidateElement
org.jivesoftware.smackx.xdatavalidation.packet.ValidateElement.RangeValidateElement
All Implemented Interfaces:
org.jivesoftware.smack.packet.Element, org.jivesoftware.smack.packet.NamedElement, org.jivesoftware.smack.packet.XmlElement, org.jivesoftware.smack.packet.XmlLangElement, FormFieldChildElement
Enclosing class:
ValidateElement

public static class ValidateElement.RangeValidateElement extends ValidateElement
Indicate that the value should fall within a certain range.
See Also:
  • Field Details

  • Constructor Details

    • RangeValidateElement

      public RangeValidateElement(String datatype, String min, String max)
      Range validate element constructor.
      Parameters:
      datatype - TODO javadoc me please
      min - the minimum allowable value. This attribute is OPTIONAL. The value depends on the datatype in use.
      max - the maximum allowable value. This attribute is OPTIONAL. The value depends on the datatype in use.
      See Also:
  • Method Details

    • appendXML

      protected void appendXML(org.jivesoftware.smack.util.XmlStringBuilder buf)
      Description copied from class: ValidateElement
      Append XML.
      Specified by:
      appendXML in class ValidateElement
      Parameters:
      buf - TODO javadoc me please
    • getMin

      public String getMin()
      The 'min' attribute specifies the minimum allowable value.
      Returns:
      the minimum allowable value. This attribute is OPTIONAL. The value depends on the datatype in use.
    • getMax

      public String getMax()
      The 'max' attribute specifies the maximum allowable value.
      Returns:
      the maximum allowable value. This attribute is OPTIONAL. The value depends on the datatype in use.
    • checkConsistency

      public void checkConsistency(FormField.Builder<?,?> formField)
      Description copied from class: ValidateElement
      Check if this element is consistent according to the business rules in XEP-0122.
      Specified by:
      checkConsistency in interface FormFieldChildElement
      Specified by:
      checkConsistency in class ValidateElement
      Parameters:
      formField - the builder used to construct the form field.
    • validate

      public void validate(FormField formField)