jzaefferer/jquery-validation — pull request #1029 by nicjansma (2014-03-05 14:18:09+00:00)
Title: Allow attributes to have a value of zero (eg min='0')

I've found that HTML rule attributes that have a value of `0` are not applied, for example, `min="0"`. If `min="0"` is specified, the user could still enter `-1` in the `` field.

This is because in `attributeRules()` there is a truthy test on the attribute's value before the rule is applied, so anything equal to `0` will be ignored.

To fix this, if the truthy test fails, I also check if the type is a number and it is `=== 0`. If so, the rule is applied.

Tests were added to validate this.