Inputmask icon indicating copy to clipboard operation
Inputmask copied to clipboard

Support for completely optional masks

Open antch opened this issue 3 years ago • 0 comments

Trying several configurations for completely optional masks, none seem to work -- for example all of these return false:

Inputmask.isValid('', { mask: '[99/99/9999]' })
Inputmask.isValid('', { regex: '([0-9]{2}/[0-9]{2}/[0-9]{4})?' })
Inputmask.isValid('', { regex: '([0-9]{2}/[0-9]{2}/[0-9]{4}|.*)' })

It seems that all of the above should return true -- or, is there another way to achieve this?

antch avatar Jul 16 '21 13:07 antch