Skip to content

v4.0.0

Compare
Choose a tag to compare
@FelixRilling FelixRilling released this 05 Jun 12:46
· 41 commits to development since this release

Breaking Changes

TL;DR:

  • Removed first parameter in validator function that provided the form input value. Validator must extract value from element which is now the first parameter. This is done because extracting the input values heavily depends on the input.
  • Dropped CSS classes for invalid elements. Use the CSS pseudo-selector :invalid instead.
  • Only support browsers which support the validation API. Increased output ECMAScript level to 2020.
  • No IIFE output is provided. Use a bundler instead.
  • All validators are looked up when starting validation, not just when they would be used.
  • Replaced default export with named one.
  • Misc. smaller type improvements that made typing more safe.
  • Made #validate instance method private. Trigger element events instead if you need programmatic validation.

All Breaking Changes

  • [breaking] Remove redundant validator dict type. 6498a37
  • [breaking] Make Validator fields readonly. 88aa131
  • [breaking] To not attempt to extract input value, pass element directly. 93cf86f
  • [breaking] Retrieve all validators before starting validation. f6e7fc3
  • [breaking] Remove support for legacy browsers (See readme). Remove custom CSS class for invalid elements (Use :invalid) instead.
  • [breaking] Make validation call private. f61558a
  • [breaking] use 'null' instead of 'false' to disable invalidClass. f5290f2
  • [breaking] Use named export instead of default. 133d38b
  • [breaking] Do not emit bundled IIFE file. Use a bundler like webpack/rollup when consuming this library from now on. bf9df6a
  • [breaking] target ES2020. 562d592

Since v4.0.0-0

  • Use Github Actions. e0939a9
  • Updated deps. c2da75d
  • Remove generic type parameter of Validator for now. 7659426
  • [breaking] Remove redundant validator dict type. 6498a37
  • Move validator dict type to Ok. c139445
  • Updated deps. 65885e7
  • Improved typings. c5bfb0b
  • Ignore infrastructure files. 98c7bde
  • Updated deps. 6caaf99

v4.0.0-0...v4.0.0