svelte-form/rule/equal

Svelte Form validation rules module.

Source:

(require("svelte-form/rule/equal"))(msg, arg) → {boolean|string}

Source:

Equal rule.

Parameters:
Name Type Description
msg string

error message.

arg mixed | function

a matcher object or matcher function = fn(val) returning true|false.

Returns:

true when valid, error message otherwise.

Type
boolean | string