Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

code style fix

  • Loading branch information...
commit 9e69fc56f44f1b9d7a9dc8247af33274a7472785 1 parent b0f8a68
@viniciusrmcarneiro viniciusrmcarneiro authored
Showing with 7 additions and 6 deletions.
  1. +7 −6 lib/validators.js
View
13 lib/validators.js
@@ -146,15 +146,16 @@ baseValidators = {
throw new Error('withFunction validator for field "' + name +
'" must be a function.');
}
- var resultValidation = func(val, params)
- if (typeof resultValidation === typeof "")
- msg = resultValidation
- else
- if (!resultValidation) {
+
+ var resultValidation = func(val, params);
+ if (typeof resultValidation === typeof "") {
+ msg = resultValidation;
+ }
+ else if (!resultValidation) {
//return rule.opts.message || 'Field "' + name + '" is not valid.';
msg = rule.opts.message || i18n.getText('model.validatesWithFunction',
{name: name}, locale);
- }
+ }
return msg;
}
Please sign in to comment.
Something went wrong with that request. Please try again.