This repository was archived by the owner on Dec 12, 2021. It is now read-only.

Description
Let's say I have a the following object and validator configuration:
const myObject = {
age: "24"
};
{
age: {
type: "number",
numericality: {
greaterThan: 0
}
}
}
The configuration will return an error Age must be of type number. The problem is that the documentation states:
Per default strings are coerced to numbers using the + operator.
While this is true, the logic has no chance of being hit - the type check is triggered first and throws an error.