Crestron Components Lib - Showcase App

ch5-textinput: minLength & maxLength attributes

A usage of the minLength attribute:
Used along with feedbackMode='submit'.
In the example below, if less than 10 characters are entered, the form cannot be submitted.
<form id="minLengthForm">
    <ch5-textinput
      minLength="10"
      required
      feedbackMode="submit">
    
    </ch5-textinput>
    <input type="submit" />
</form>
A usage of the maxLength attribute: Used along with feedbackMode='submit'.
in the example below, more than 20 characters cannot be passed in the input.
<form id="maxLengthForm">
    <ch5-textinput
      maxLength="20"
      required
      feedbackMode="submit">
    </ch5-textinput>
    <input type="submit" />
  </form>
A usage of the maxLength attribute without feedbackMode:
Result: The maxLength attribute should not be seen on the input because
the minlength and maxLength attributes are used along with feedbackMode="submit" (open inspect element to see this).
<ch5-textinput
  maxLength="20"
>
</ch5-textinput>