Releases: dockwa/simple-react-validator
Adds support for onBlur to enable showing individual messages
Pulls changes from @ej2015 pull request #91 and adds to it.
Support for showMessageFor(field)
and hideMessageForm(field)
.
Also added an autoForceUpdate
option to the constructor to automatically reload when messages are shown or hidden.
onBlur
You can use the react onBlur action to show individual fields once the input is blurred. Use the showMesssageFor
or hideMessageFor
methods.
<div className="form-group">
<label>Email</label>
<input value={this.state.email} onBlur={this.validator.showMessageFor.bind(null, 'email')} className="form-control" onChange={/* update email */} />
{this.validator.message('email', this.state.email, 'required|email')}
</div>
Bug fix for messageWhenPresent method
Fixes and error where messageWhenPresent broke in release 1.0.6.
New messageWhenPresent() method
- Use the new
messageWhenPresent()
method to show a custom message string. Good for ajax response errors. - Deprecated
messageAlways()
to be replaced by themessageWhenPresent()
method. - Documented all the public method available in the readme.
Bug Fix: errorMessages() messages doesn't contain compiled parameters
Better Email Validator and Fix Server Side Rendering
This release includes fixes #49 and #50.
Thanks @cassio-nuke and @Abhisiet50 for filling bug reports that led to these fixes.
Fix required validator
Another patch to go with the last release with the isBlank helper method.
Blank validation and camelCase field support
Fix Integer Rule
This fixes the integer rule that prior only passed if there was one digit, now you can have as many digits as you want as long as it is still an integer.
1.0.0 release!
Big update to the original release of this package.
- Check out this pull request for all the changes. #20
- Many new validators.
- Date validation with momentjs.
- Better configuration and options.
- Much much more...
First 1.0.0 Beta Release
Use npm install simple-react-validator@beta
to install beta version. Testing and feedback is highly appreciated. See #20 to track the HUGE improvements coming to this new version.