validate.js icon indicating copy to clipboard operation
validate.js copied to clipboard

Partially reverted https://github.com/ansman/validate.js/commit/bebe8…

Open huan086 opened this issue 9 years ago • 4 comments

…8ed9a40c38a37f44611650b68710e85cee1 to allow "" but reject whitespace, for all validators except equality.

The current behaviour without this commit causes all fields to be required, even without the presence.

huan086 avatar Nov 07 '16 06:11 huan086

Coverage Status

Coverage remained the same at 100.0% when pulling 7b5a991504a5d84b0b9f3a327cfe04ad9c1eb5f4 on huan086:master into d7f6baa78dec5d50f91118a5baa22c73429634bd on ansman:master.

coveralls avatar Nov 07 '16 06:11 coveralls

Coverage Status

Coverage remained the same at 100.0% when pulling fc331eaa98c47440c085d232bf64e26ca83829a2 on huan086:master into d7f6baa78dec5d50f91118a5baa22c73429634bd on ansman:master.

coveralls avatar Nov 07 '16 14:11 coveralls

@huan086 I feel like validate.js should a global setting wether to consider empty string, arrays and objects empty or not.

Ideally presence should capture everything that the other validators lets though. As it is now you can have values that falls through the cracks.

ansman avatar Nov 25 '16 17:11 ansman

Coverage Status

Coverage remained the same at 100.0% when pulling 191f9ca1be14e2e010ddaf45d094358e887b9ad9 on huan086:master into ab5ad5a3a7a82546c7a1aecedb338b6413e20119 on ansman:master.

coveralls avatar Dec 01 '16 12:12 coveralls