react-form-validator-component
Advanced tools
Comparing version 1.6.6 to 1.6.7
{ | ||
"name": "react-form-validator-component", | ||
"version": "1.6.6", | ||
"version": "1.6.7", | ||
"main": "build/lib/index.js", | ||
@@ -5,0 +5,0 @@ "repository": "git@github.com:JDLT-Ltd/react-form-validator-component.git", |
@@ -81,3 +81,3 @@ import React from 'react' | ||
<Header as="h2">Basic Validation</Header> | ||
<Validator fields={this.fields} parent={this} validateOnLoad> | ||
<Validator fields={this.fields} parent={this}> | ||
{({ isFormValid, isFieldValid, onChange, errors }) => { | ||
@@ -88,3 +88,3 @@ return ( | ||
<label>Your Emails</label> | ||
<input name="emailAddresses" onChange={onChange} /> | ||
<input name="emailAddresses" onChange={onChange} content="notAnEmail" /> | ||
{this.renderErrors(errors.emailAddresses)} | ||
@@ -91,0 +91,0 @@ </Form.Field> |
@@ -24,3 +24,3 @@ import React from 'react' | ||
// TODO: only remove errors from empty fields | ||
if (this.props.validateOnLoad) | ||
if (!this.props.validateOnLoad) | ||
Object.values(this.props.fields).forEach(field => this.removeAllErrorMessages(field.name)) | ||
@@ -27,0 +27,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
324589