svelte-form/rule/rx

Svelte Form validation rules module.

Source:

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

Source:

Custom regex rule.

Parameters:
Name Type Description
msg string

error message.

arg number

Regular expression.

Returns:

true when valid, error message otherwise.

Type
boolean | string