Skip to content

Commit

Permalink
version bump, run dist, add package-lock
Browse files Browse the repository at this point in the history
  • Loading branch information
stuyam committed Oct 16, 2017
1 parent 78814a8 commit bbbfe11
Show file tree
Hide file tree
Showing 5 changed files with 2,429 additions and 7 deletions.
12 changes: 10 additions & 2 deletions dist/simple-react-validator.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Simple React Validator v0.0.4 | Created By Dockwa | MIT License | 2017
// Simple React Validator v0.0.5 | Created By Dockwa | MIT License | 2017
;(function(root, factory) {
if (typeof define === 'function' && define.amd) {
define(['react'], factory);
Expand Down Expand Up @@ -123,13 +123,21 @@ var SimpleReactValidator = function () {
key: 'allValid',
value: function allValid() {
for (var key in this.fields) {
if (this.fields.hasOwnProperty(key) && this.fields[key] === false) {
if (this.fieldValid(key) === false) {
return false;
}
}
return true;
}

// return true if the one field passed in is valid, false if there is an error

}, {
key: 'fieldValid',
value: function fieldValid(field) {
return this.fields.hasOwnProperty(field) && this.fields[field] === true;
}

// if a message is present, generate a validation error react element

}, {
Expand Down
4 changes: 2 additions & 2 deletions dist/simple-react-validator.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ var inject = require('gulp-inject-string')
var rename = require('gulp-rename');
var uglify = require('gulp-uglify');
var babel = require('gulp-babel');
var HEADER_COMMENT = '// Simple React Validator v0.0.4 | Created By Dockwa | MIT License | 2017\n';
var HEADER_COMMENT = '// Simple React Validator v0.0.5 | Created By Dockwa | MIT License | 2017\n';

var gutil = require('gulp-util');

Expand Down
Loading

0 comments on commit bbbfe11

Please sign in to comment.