# Changelog

## [1.0.10] - 2026-06-11

### Fixed
- `setError` was passing arguments to `updateStoreForFormValidity` in the wrong order, corrupting the Redux store (`valid` received the message string, `error` received a boolean)
- Redux reducer `UPDATE_FORM_VALIDITY` was unconditionally resetting `pristine`, `submitting`, and `submitted` on every validity check. During form submission this caused `submitting` to flip back to `false` immediately after being set to `true`
- `getAssignedValidationMessage` was including the `valid` key in its search, so a valid input could be matched as an "invalid prop" (since `valid: true` is truthy)
- Comma operator used as statement separator in `Form` and `InputGroup` constructors (`counter++, this.id = ...`) replaced with two proper statements

### Changed
- `react` and `react-dom` moved from `dependencies` to `peerDependencies` (and `devDependencies` for local development). Libraries must not bundle their own React copy
- `Array.indexOf(...) === -1` replaced with `!Array.includes(...)` in `assignValidationMessage`
- `tooLong`/`tooShort` fallback messages now use the correct DOM IDL properties `maxLength`/`minLength` (was `maxlength`/`minlength`, which return `undefined` in real browsers)
- `tooLong`/`tooShort`/`rangeOverflow`/`rangeUnderflow` fallback messages reworded to be clearer
- `typeMismatch` message reworded: "Enter a valid {type}." (was "Value is not a valid {type}.")

### Added
- Fallback messages for `patternMismatch` (uses `title` attribute if set, otherwise "Value does not match the required format."), `stepMismatch`, and `badInput`. Previously these had no fallback and always showed the browser's own message, which varies across browsers.
- `change` event listener in `subscribePristineHandler` alongside the existing `input` listener. Without this, checkboxes, radios, selects, and file inputs never triggered pristine state changes.

### Removed
- Unused `DEFAULT_VALIDITY` import in the Redux reducer (not exported from Constants)
- Unused destructured variables (`inputs`, `updateInputValidity`, `formAction`, `formState`) in `Form` and `InputGroup` render methods

## [1.0.7]

- Added `submitted` state property in scope of form
- Form state booleans now reflect on `data-*` attributes
- Extended bootstrap demo
- Added E2E example

## [1.0.6]

- Added `pristine` and `submitting` state properties in scope of form
- `scrollIntoViewFirstInvalidInputGroup()` is now called only on submit, not on every `checkValidity` call

## [1.0.5]

- Build fix

## [1.0.4]

- Input node is re-queried when the node was destroyed by a component update
- Added Redux actions and reducer
