Skip to main content
Version: 0.1.2

Interface: ValidatorEntry

Imported from @react-logic/utils

One validation rule on a field. name is required (becomes the error key in the snapshot's errors tree); message defaults to name on failure; htmlAttrs ride along into the input's bind props.

Type Parameters​

T​

T

The field's value type.

Properties​

fn​

readonly fn: (value) => boolean

Parameters​

value​

T

Returns​

boolean


htmlAttrs?​

readonly optional htmlAttrs?: HTMLValidationAttrs


message?​

readonly optional message?: string


name​

readonly name: string