igorescobar / jQuery-Mask-Plugin

A jQuery Plugin to make masks on form fields and HTML elements.
http://igorescobar.github.io/jQuery-Mask-Plugin/
Other
4.77k stars 1.42k forks source link

Mask allowing partially filled input to be submitted #774

Open solis-eduardo opened 3 years ago

solis-eduardo commented 3 years ago

Device

Ubuntu 20.04.2

Browser

Brave: 1.26.77 Chromium: 91.0.4472.164 (Versão oficial) 64 bits Chrome: 92.0.4515.107 (Versão oficial) 64 bits

jsfiddle

https://jsfiddle.net/ozq6mvj7/

When trying to make a CPF mask, the '0' character doesn't require any filling on submit, while on the docs it is stated: [...] '0': {pattern: /\d/}, '9': {pattern: /\d/, optional: true}, [...]. Shouldn't the plugin require a minlength on this case?