Skip to main content

Function: validateMonitorField()

validateMonitorField(type: "http" | "http-keyword" | "http-status" | "http-header" | "http-json" | "http-latency" | "port" | "ping" | "dns" | "ssl" | "websocket-keepalive" | "server-heartbeat" | "replication" | "cdn-edge-consistency", fieldName: string, value: unknown): Promise<readonly string[]>

Defined in: src/utils/monitorValidation.ts:239

Validate individual monitor field with improved error filtering.

Parametersโ€‹

typeโ€‹

Monitor type.

"http" | "http-keyword" | "http-status" | "http-header" | "http-json" | "http-latency" | "port" | "ping" | "dns" | "ssl" | "websocket-keepalive" | "server-heartbeat" | "replication" | "cdn-edge-consistency"

fieldNameโ€‹

string

Field name to validate.

valueโ€‹

unknown

Field value.

Returnsโ€‹

Promise<readonly string[]>

Promise resolving to validation errors (empty when valid).