Open Olian04 opened 6 years ago
What about this api (asking future me)?
Evaluate(val, constraint, e =>
throw `${name}.${e.key} => Expected ${e.value} to ${e.not ? 'not' : ''} ${e.message}`
// EX: Demo.foo => Expected 3 to be less than or equal to 1
)