-1
I am making a form and using the React-input-Mask component. I am in the phone field part, and would like to accept either the '(99) 9999-9999' or '(99) 9 9999-9999' landline format, but after reading the documentation I could not figure out how to do this.
<InputMask onBlur={(e) => this.handleBlur('telefone', e.target.value)}
type="text"
defaultValue={new_item.telefone}
class='inputTextCriar'
mask="(99) 9999-9999">
</InputMask>
This is the code at the moment, I would like to make this same field accept both formats. I thank you already!
Good brother! it worked, only if I put the fixed number format it only 'adapts' when I leave the field, but it’s locked. Thanks!!
– placementw