Skip to content

Releases: dockwa/simple-react-validator

Adds support for onBlur to enable showing individual messages

31 May 17:34
Compare
Choose a tag to compare

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

10 Apr 20:21
Compare
Choose a tag to compare

Fixes and error where messageWhenPresent broke in release 1.0.6.

New messageWhenPresent() method

05 Apr 17:39
Compare
Choose a tag to compare
  • Use the new messageWhenPresent() method to show a custom message string. Good for ajax response errors.
  • Deprecated messageAlways() to be replaced by the messageWhenPresent() method.
  • Documented all the public method available in the readme.

Bug Fix: errorMessages() messages doesn't contain compiled parameters

11 Feb 19:54
Compare
Choose a tag to compare

Merges pull request #51 thanks @oniice for the contribution.

Better Email Validator and Fix Server Side Rendering

08 Feb 20:36
Compare
Choose a tag to compare

This release includes fixes #49 and #50.
Thanks @cassio-nuke and @Abhisiet50 for filling bug reports that led to these fixes.

Fix required validator

03 Jan 21:44
Compare
Choose a tag to compare

Another patch to go with the last release with the isBlank helper method.

Blank validation and camelCase field support

21 Dec 20:01
Compare
Choose a tag to compare

Improvements: Support for camelCase field names #37
Bug fix: Integer 0 to be considered present and not blank #36

Fix Integer Rule

03 Dec 21:39
Compare
Choose a tag to compare

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!

16 Nov 16:15
Compare
Choose a tag to compare

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

31 Oct 21:02
Compare
Choose a tag to compare
Pre-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.