title: How to format a single field with multiple mask
body: <p>I would like a creative idea to create a multiple-masking component.</p>
  
  <p>My purpose is to have a field that accepts multiple macaras.
  Example: A field that accepts the following masks: "999.999.999-99", "99.999.999 / 9999-99"</p>
  
  <p>If I type: "99." The second mask is automatically selected.</p>
  
  <p>If I type: "999." Automatically selected the first mask.</p>
  
  <p>Note that I want to do the following verification:</p>
  
  <ol>
  <li><p>Mask is invalid try with second, third, fourth ... mask until one is possible or otherwise bar user input.</p></li>
  <li><p>If the mask field is larger than the current mask and there is a corresponding mask selected and applied to the mask.</p></li>
  </ol>
  
  <p>An example of what I intend to do can be found  at:  <code>A field many possibilities (CPF, CNPJ, Phone):
  &lt;input type="text" value="" data-custommask-auto-apply="true" data-custommask-template='["999.999.999-99","99.999.999/9999-99","(99) 9999-9999","(99) 99999-9999"]' /&gt;</code> </p>
  
  <p><a href="https://jsfiddle.net/5gd0xj1b/5/" rel="nofollow noreferrer">JSFiddle here.</a></p>