Closed helnokaly closed 8 years ago
The equals validation fails with numbers because it compares Number with String (1 === '1')
data: { num: 1 }
rules: { num: 'integer|equals:1' }
validation: { "errors": [ { "field": "num", "validation": "equals", "message": "equals validation failed on num" } ] }
Sorry for the late reply have been busy lately. I will cast the value to a number before running the validation. Thanks for reporting.
The equals validation fails with numbers because it compares Number with String (1 === '1')