Function: validateMonitorField()
validateMonitorField(
type
:string
,fieldName
:string
,value
:unknown
):ValidationResult
Defined in: shared/validation/schemas.ts:529
Validates a specific field of a monitor using the appropriate schema.
Parametersโ
typeโ
string
The monitor type string ("http" or "port").
fieldNameโ
string
The name of the field to validate.
valueโ
unknown
The value of the field to validate.
Returnsโ
The validation result object for the field.
Remarksโ
Useful for real-time validation during form input. Only validates the specified field.
Throwsโ
https://zod.dev/basics?id=handling-errors If validation fails and is not handled internally.
Throwsโ
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global\_Objects/Error If the field name is unknown for the given monitor type.