You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Dec 12, 2021. It is now read-only.
Description
Given I need to validate value is not
empty, for example'': Invalid' ': ValidProblems
Option
presenceexplicitly stateswhitespaces onlyis not a valid string. So I head toformat.However, default format validator always allows empty value (empty defined above) at the beginner which ignores my regex object.
Reproduce the problem
Here is the fiddle to demonstrate the problem: https://jsfiddle.net/8okbtbuz/
Given I have a regex
^.{1,64}$'which ensures there is at least one character,validator.single()always treat theemptyvalue is a valid one.Problematic codes spotted
https://github.com/ansman/validate.js/blob/master/validate.js#L948
It always return success for empty value. This is not good.....