MCPcopy
hub / github.com/immich-app/immich / IsIPRange

Function IsIPRange

server/src/validation.ts:29–33  ·  view source on GitHub ↗
(options?: IsIPRangeOptions)

Source from the content-addressed store, hash-verified

27 * z.string().optional().transform(...).pipe(IsIPRange({ requireCIDR: false }))
28 */
29export function IsIPRange(options?: IsIPRangeOptions) {
30 return z
31 .array(z.string())
32 .refine((arr) => arr.every((item) => isIPOrRange(item, options)), 'Must be an ip address or ip address range');
33}
34
35/**
36 * Like z.object().partial(), but rejects objects where every field is undefined.

Callers 1

env.dto.tsFile · 0.90

Calls 1

isIPOrRangeFunction · 0.85

Tested by

no test coverage detected