I'm trying to use these two masks according to the number of digits. Visually it works, but when I send the form, the first mask is always selected. How to solve this? I'm using imask-react
const maskOptions = {
mask: [
{
mask: '(00) 0000-0000',
overwrite: true,
},
{
mask: '(00) 00000-0000',
overwrite: true,
},
],
};
Try the dispatch function