Skip to content

@serenity-is/corelib / ValidationHelper / getValidator

Function: getValidator()

getValidator(elem): Validator

Defined in: src/compat/validation.ts:152

Gets the Validator instance associated with the given element.

Parameters

elem

The form/element (or array-like wrapper) to look up the validator for.

HTMLElement | ArrayLike<HTMLElement>

Returns

Validator

The existing Validator instance, or null/undefined if none is attached.