- Add a
validateElement
option toValueMissingValidator
for cases wherevalueMissing
(required) isn't keyed off ofelement.value
such as checkboxes #7
- Introduce a pattern for easier translations of error messages
- Fixed checks to make sure
this.internals
andsuperclass.formAssociated
aren't already defined.
-
BREAKING_CHANGE: Validators are now functions. Because of shared objects, we don't want mutations to override objects. This also opens up the possibility of allowing "options" in the future.
-
Feature:
this.updateInteractionState()
is now exposed on the host element. -
Feature:
this.updateValidity()
is now exposed on elements and replaces the old privaterunValidators(element)
function. -
Feature: Added CustomStatesMixin to allow setting custom states even if the element is not formAssociated.
-
Bug: remove
runValidators
fromformDisabledCallback
. -
Bug: Fixed a bug in
tabindex
detection in the constructor. -
Bug(types): Loosened Lit version for types for better deduping.
-
Bug: Removed
checkFocusability
-
Deprecated: No longer run validators prior to
setFormValue
-
Deprecated: Remove
set form(value: string)
it's confusing because browsers dont do this, and you should set the attribute manually.
- Bug Fix(types): Fixed a bug in types for LitFormAssociated.
- Bug Fix(types): Fixed a bug in types for LitFormAssociated.
- Feature: Added the following functions for custom states to
VanillaFormAssociatedMixin
:
addCustomState (state) {}
deleteCustomState (state) {}
hasCustomState (state) {}
toggleCustomState (state, force) {}
With fallbacks for unsupported browsers.
- Bug Fix:
runValidators()
now preserves custom errors, and will also run prior to checkValidity() and reportValidity().
validationTarget
is defined as agetter
and falls back to the value ofthis.formControl
- Added multiple tests around states.