Avoid integer and float values false pass 'inList' validation #800

Closed
wants to merge 1 commit into
from

Conversation

Projects
None yet
1 participant
Contributor

v-v-vishnevskiy commented Jan 25, 2013

As PHP prefers to compare integers/floats if one of the arguments have type int/float false positives are very common, like 0 == 'a'. This patch prevents such behavior for 'inList' validation rule but only for case when validated value have type int/float. It does not process list of allowed values.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment