Skip to content

Excluded Plugin

Skips validation for fields that are disabled, hidden, or match a custom exclusion function.

Options

OptionTypeDefaultDescription
excludedstring | ((field: string, element: HTMLElement) => boolean)built-in rulesCustom exclusion rule. A CSS selector string or a function returning true to exclude the field.

Playground

Notes

  • By default, always excludes elements that have the disabled attribute or type="hidden".
  • The custom excluded function is evaluated after the built-in disabled/hidden check. If the built-in check already excludes the field, the custom function is not called.
  • Compatible with Sequence — excluded fields do not count as failures.

Released under the MIT License.