framework
framework copied to clipboard
Properly invalidate if required attribute/property changes
Type: bug
The following has been addressed in the PR:
- [ ] There is a related issue
- [x] All code has been formatted with
prettieras per the readme code style guidelines - [x] Unit or Functional tests are included in the PR
Description:
Current InputValidity meta and validity middleware do not invalidate when the required status of a field changes. This results in an outside trigger being required before the correct validity is captured.
This change, which is breaking, takes the expected required value and compares it to the required attribute on the HTMLFormElement node. If they do not match, it invalidates (same behavior as when the values do not match).
Codecov Report
Merging #546 (15b22a7) into master (1626e35) will increase coverage by
0.00%. The diff coverage is98.03%.
@@ Coverage Diff @@
## master #546 +/- ##
=======================================
Coverage 97.43% 97.43%
=======================================
Files 117 117
Lines 6513 6515 +2
Branches 1479 1479
=======================================
+ Hits 6346 6348 +2
Misses 167 167
| Impacted Files | Coverage Δ | |
|---|---|---|
| src/testing/mocks/middleware/icache.ts | 92.85% <92.85%> (ø) |
|
| src/core/WidgetBase.ts | 100.00% <100.00%> (ø) |
|
| src/core/meta/InputValidity.ts | 100.00% <100.00%> (ø) |
|
| src/core/middleware/focus.ts | 100.00% <100.00%> (ø) |
|
| src/core/middleware/icache.ts | 100.00% <100.00%> (ø) |
|
| src/core/middleware/validity.ts | 100.00% <100.00%> (ø) |
|
| src/core/vdom.ts | 98.92% <100.00%> (ø) |
|
| src/routing/ActiveLink.ts | 100.00% <100.00%> (ø) |
|
| src/routing/Router.ts | 100.00% <100.00%> (ø) |
|
| ... and 4 more |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact),ø = not affected,? = missing dataPowered by Codecov. Last update 99ac08c...15b22a7. Read the comment docs.