-module(validator@int). -compile(no_auto_import). -export([min/2, max/2]). min_check(Min) -> fun(Value) -> case Value < Min of true -> none; false -> {some, Value} end end. min(Error, Min) -> validator@common:custom(Error, min_check(Min)). max_check(Max) -> fun(Value) -> case Value > Max of true -> none; false -> {some, Value} end end. max(Error, Max) -> validator@common:custom(Error, max_check(Max)).