The function that provides validation on an argument.
static struct S { @PreValidate!(str => Result!void.failureIf(str.length != 3, "Number must be 3 digits long.")) @PostValidate!(i => Result!void.failureIf(i <= 200, "Number must be larger than 200.")) int arg; } alias Binder = ArgBinder!(jaster.cli.binder); alias UDAs = __traits(getAttributes, S.arg); assert(Binder.bind!(int, UDAs)("20").isFailure); assert(Binder.bind!(int, UDAs)("199").isFailure); assert(Binder.bind!(int, UDAs)("300").asSuccess.value == 300);
An @ArgValidator that runs the given Func during pre-binding validation.