| In addition to a global flag, I think it's important to implement this on a per-annotation basis for two reasons:
- There are use cases where developers will want more finer grained control. Consider a source of sensors, which produce values every 100ms, ignoring those provided out of order within a 10ms buffer might be important, whereas say other logic within the same system (that shares the same Validator instance) might determine anything within 1 minute or 10 minutes as close enough.
- Defining the tolerance within the annotation properties is far more descriptive as it's close to the logic, whereas a global property is far removed from the logic.
|