Skip to main content

Function: validateMonitorFieldClientSide()

validateMonitorFieldClientSide<TType, TField>(type: TType, fieldName: TField, value: MaybeUndefined<MonitorFieldValue<TType, TField>>): Promise<ValidationResult>

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

Validate a specific monitor field for real-time feedback using shared schemas. Provides immediate validation without IPC round-trip.

Type Parametersโ€‹

TTypeโ€‹

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

Monitor type under validation.

TFieldโ€‹

TField extends string

Field identifier belonging to the monitor form.

Parametersโ€‹

typeโ€‹

TType

Monitor type.

fieldNameโ€‹

TField

Field name to validate.

valueโ€‹

MaybeUndefined<MonitorFieldValue<TType, TField>>

Field value to validate.

Returnsโ€‹

Promise<ValidationResult>

Promise resolving to validation result.