DeuxHuitHuit / framework.js-modules

Collections of modules we frequently use with our framework, https://github.com/DeuxHuitHuit/framework.js
https://deuxhuithuit.github.io/
Other
3 stars 8 forks source link

(fix) Make the pattern optional #375

Closed nitriques closed 4 years ago

nitriques commented 4 years ago

allowEmpty does not works as intended: it controls wether empty strings are allowed or not.

To make the empty string pass validation, we need to make it optional, by matching on either the pattern or an empty string.