react-form-validator-component
Advanced tools
Comparing version 1.0.7 to 1.1.0
{ | ||
"name": "react-form-validator-component", | ||
"version": "1.0.7", | ||
"version": "1.1.0", | ||
"main": "build/lib/index.js", | ||
@@ -5,0 +5,0 @@ "repository": "git@github.com:JDLT-Ltd/react-form-validator-component.git", |
@@ -5,3 +5,3 @@ # React Form Validator | ||
The render prop function will be passed `isValid`, `errors`, `fields`, and `onChange` to use in the form itself. | ||
The render prop function will be passed `isFormValid`, `isFieldValid`, `errors`, `fields`, and `onChange` to use in the form itself. | ||
@@ -33,3 +33,3 @@ ## Installation | ||
<Validator fields={this.state.fields} parent={this}> | ||
{({ isValid, fields, onChange, errors }) => { | ||
{({ isFormValid, fields, onChange, errors }) => { | ||
return ( | ||
@@ -42,3 +42,3 @@ <form> | ||
})} | ||
{isValid && <button type="submit">Submit</button>} | ||
{isFormValid && <button type="submit">Submit</button>} | ||
</form> | ||
@@ -100,6 +100,11 @@ ) | ||
#### `isValid` | ||
#### `isFormValid` | ||
A boolean. `true` when all inputs are validated. | ||
#### `isFieldValid` | ||
An object with a property for each field which will be `true` if it's valid and `false` if it's not. | ||
#### `fields` | ||
@@ -106,0 +111,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
269993
143