Crestron Components Lib - Showcase App

ch5-textinput: mask attribute

usage of mask attribute for phone number
Info: this attribute will force you to add a valid phone number,
when the input value doesn't follow the given pattern then you can't submit the input
<ch5-textinput
  label="Phone number:"
  icon="fa fa-phone"
  size="x-large"
  placeholder="Phone Number"
  mask="(+99) 999 999 999"
  id="phoneNumber"
  >
</ch5-textinput>
usage of mask attribute for USA zipcodes
Info: this attribute will force you to add a USA zipcode
<ch5-textinput
  label="USA Zipcode"
  icon="fa fa-city"
  placeholder="USA Zipcode"
  mask="99999 9999"
  id="zipCode"
  >
</ch5-textinput>
usage of mask attribute for Visa Card Number
Info: you have to be able to add only 16 numbers
See also the js tab how to work with the events on mask
<ch5-textinput
  label="Your VISA number"
  icon="fa fa-credit-card"
  placeholder="Firstname"
  mask="9999 9999 9999 9999"
  id="creditCard"
  >
</ch5-textinput>
usage of mask attribute for prices
Info: adding a price following the pattern
<ch5-textinput
  label="Price:"
  icon="fa fa-money-bill-wave-alt"
  placeholder="Price"
  mask="9,99"
  id="price"
  >
</ch5-textinput>