Provide min and max string constraints for number input elements

XMLWordPrintable

    • Type: New Feature
    • Resolution: Done
    • Priority: Major
    • 10.2.0
    • Affects Version/s: 9.6.4
    • Component/s: None
    • Security Level: Jimmy
    • None

      User Story

      As a developer, I want to restrict the min and max values a user may type into a number input element (intbox, decimalbox, etc)

      Currently, I can set no zero, no negative, no positive, but cannot set a min and max value. As a result, implementing this type of constraint requires a server-side constraint class.

      Acceptance Criteria

      <decimalbox constraint="no zero, max 100,"/>
      <decimalbox constraint="no negative, min -100,"/>
      <decimalbox constraint="min 10, max 20,"/>

      <intbox constraint="no zero, max 100,"/>
      <intbox constraint="no negative, min -100,"/>
      <intbox constraint="min 10, max 20,"/>

      <longbox constraint="no zero, max 100,"/>
      <longbox constraint="no negative, min -100,"/>
      <longbox constraint="min 10, max 20,"/>

      <doublebox constraint="no zero, max 100,"/>
      <doublebox constraint="no negative, min -100,"/>
      <doublebox constraint="min 10, max 20,"/>

      Details

      currently, only <spinner> and <doublespinner> supports this features. So it's better that all these components share the same implementation instead of each has its own.

      Workaround

      DoubleRangeConstraint.java

            Assignee:
            jamson
            Reporter:
            MDuchemin
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: