range static method
Implementation
static Validator<String> range(
String startIp,
String endIp, {
String? error,
}) =>
(value, context) {
final ip = context.resources.tryGet<IpResource>(
value,
temp: !context.usePermanentCache,
);
if (ip == null) return (false, 'ip resource not found in context');
if (ip.inRange(startIp, endIp)) {
return (true, null);
}
return (false, error ?? context.errors.ipErrors.range(startIp, endIp));
};