Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,18 @@ yarn add react-final-form-html5-validation react-final-form final-form

[![Edit 🏁 React Final Form - HTML5 Validation Example](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/s/14r018yjp4)

## React Compatibility

This library supports React 16.8+ (with Hooks), React 17, React 18, and React 19.

**Supported versions:**
- React 16.8.0 or higher
- React 17.x
- React 18.x
- React 19.x

**Note:** CI currently tests against React 18.x. While the library is compatible with React 16.8+, 17.x, and 19.x based on the peer dependency declaration, full automated test coverage across all versions is not yet implemented.
Comment on lines +38 to +48
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Remove duplicate “React Compatibility” section to avoid docs drift.

The same section appears twice in the README per the summary; keep a single canonical location to prevent inconsistencies and TOC noise.

🤖 Prompt for AI Agents
In `@README.md` around lines 38 - 48, The README contains a duplicated "React
Compatibility" section; remove the second occurrence and keep one canonical
"React Compatibility" block (the one with heading "## React Compatibility" and
the bullet list for supported versions). Update any Table of Contents or links
if they reference the removed copy and ensure only a single "React
Compatibility" heading remains to avoid docs drift.


## Usage

The way you specify rules and error messages in HTML5 is by giving first a rule prop, e.g. `required`, `min`, `maxLength`, and then an error message prop, e.g. `valueMissing`, `rangeUnderflow`, or `tooLong`, respectively. This library comes with built-in English defaults for the error messages, but you will probably want to override those by passing in your own.
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@
"peerDependencies": {
"final-form": ">=5.0.0",
"react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0",
"react-dom": "^18.2.0",
"react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0",
"react-final-form": ">=7.0.0"
},
"jest": {
Expand Down