Feature request - range validator
Closed this issue · 3 comments
tomron commented
Validates that the field values are with in a given range (and value geq \ gt \ leq \ lt). It is easy to implement but would be nice to wrap it in a function.
Something like -
validateRangeFields(Seq[Tuple(String, Numeric, Numeric, Boolean, Boolean)])
(sorry for the poor scala syntax, I'm a scala newbie)
Where the tuple fields stands for -
- column name
- range start
- range end
- start inclusive (false implies > check, true implies >= check)
- end inclusive (false implies > check, true implies >= check)
Thanks!
MrPowers commented
@tomron - sorry for the late response.
I've made functions like isGt40Lte80
and isGte5Lt90
before. Would you like functions like these, but a more generic version?
tomron commented
I truly don't remember :) but make sense I looked for something more generic
MrPowers commented
Feel free to open this back up if the details ever come back to you!