Inputmask
Inputmask copied to clipboard
Support for completely optional masks
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?