sensemaking/iz — pull request #2 by eldonferrandepol (2013-05-16 21:52:39+00:00)
Title: All validators that validate aginst the value of the argument passed for...

... validation return false for null and undefined

Please note: This request modifies existing behaviour.

Found some inconsistency in the output of the various validators when handling null and undefined. In general they all return false; however the following inconsistencies were found:

alphaNumeric, date & ip all return true rather than false
empty, ofType, minLength x2 & maxLength all threw exceptions.

In all cases they now return false.

There has been no change to iz_extension as this is not actually testing the value of the argument. i.e. iz_extension(null, null) is perfectly valid if fairly pointless.

There has also been no change to iz_inArray. Again, no reason why iz_inArray(null, [null, "a string", 2]) should not be allowed.