Fixed validation rule value
This commit is contained in:
parent
7e909fb188
commit
d8cd404412
|
|
@ -16,7 +16,7 @@ var convertValidationsToObject = function (validations) {
|
|||
if (args.length > 1) {
|
||||
throw new Error('Formsy does not support multiple args on string validations. Use object format of validations instead.');
|
||||
}
|
||||
validations[validateMethod] = args[0] || true;
|
||||
validations[validateMethod] = args[0];
|
||||
return validations;
|
||||
}, {});
|
||||
|
||||
|
|
|
|||
|
|
@ -115,7 +115,7 @@ Formsy.Form = React.createClass({
|
|||
var component = this.inputs[name];
|
||||
var args = [{
|
||||
_isValid: !(name in errors),
|
||||
_serverError: errors[name]
|
||||
_validationError: errors[name]
|
||||
}];
|
||||
component.setState.apply(component, args);
|
||||
}.bind(this));
|
||||
|
|
|
|||
Loading…
Reference in New Issue