@iwsio/forms
Advanced tools
Comparing version 1.1.1 to 2.0.0
@@ -12,3 +12,3 @@ import { FormHTMLAttributes, PropsWithChildren } from 'react'; | ||
/** | ||
* Toggles `noValidate` on the `<form/>`. When false, `noValidate` is true. | ||
* When true, relies on native browser validation. In other words: it toggles `noValidate` on the `<form/>`. When false, `noValidate` is true. | ||
*/ | ||
@@ -27,3 +27,3 @@ nativeValidation?: boolean; | ||
/** | ||
* Toggles `noValidate` on the `<form/>`. When false, `noValidate` is true. | ||
* When true, relies on native browser validation. In other words: it toggles `noValidate` on the `<form/>`. When false, `noValidate` is true. | ||
*/ | ||
@@ -30,0 +30,0 @@ nativeValidation?: boolean; |
@@ -50,4 +50,4 @@ "use strict"; | ||
reportValidity: false, | ||
nativeValidation: false, | ||
nativeValidation: true, | ||
className: '' | ||
}; |
{ | ||
"name": "@iwsio/forms", | ||
"version": "1.1.1", | ||
"version": "2.0.0", | ||
"description": "Simple library with useful React forms components and browser validation.", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
@@ -134,3 +134,3 @@ # @iwsio/forms | ||
## `<InvalidFeedbackForField />` | ||
One last component: this is just a helper component to display errors using the `useFieldState` properties mentioned above. Feel free to use this an example to make your own or consume it as-is. It currently returns a `<span/>` containing the error with any additional span attributes you provide as props. It consumes `checkFieldError(name)` to determine when to render and will return `null` when no error exists. | ||
One last component: this is just a helper component to display errors using the `useFieldState` properties mentioned above. Feel free to use this an example to make your own or consume it as-is. It currently returns a `<span/>` containing the error with any additional span attributes you provide as props. It consumes `checkFieldError(name)` to determine when to render and will return `null` when no error exists. You'll likely want to disable native validation reporting if you use this. Set `nativeValidation={false}` on the `ValidatedForm` or `FieldManager`, whichever one you use. | ||
@@ -137,0 +137,0 @@ ### Source: |
42582