igorescobar/jQuery-Mask-Plugin — pull request #170 by kassner (2014-06-19 15:51:29+00:00)
Title: Conflict with clearIfNotMatch and optional patterns

Hi,

I've found a conflict between `clearIfNotMatch` option when using optional patterns. Basically, if I have a mask like `0009`, which the 4th digit is optional, the input will only be cleared if I have 4 digits on it, but not with 3.

[Conflict example](http://kassner.net.br/tests/jquery-mask-plugin/test-1.6.4.html)

[Proposed solution example](http://kassner.net.br/tests/jquery-mask-plugin/test-fork.html)

I haven't written any unit tests, let me know it they are required to merge.