File tree Expand file tree Collapse file tree 1 file changed +17
-8
lines changed Expand file tree Collapse file tree 1 file changed +17
-8
lines changed Original file line number Diff line number Diff line change @@ -23,8 +23,10 @@ var validators = {
23
23
* checking).
24
24
**/
25
25
validators . equalToProperty = function ( name , msg ) {
26
- return function ( v , next , ctx ) {
27
- if ( v === this [ name ] ) return next ( ) ;
26
+ return function ( v , next ) {
27
+ if ( v === this [ name ] ) {
28
+ return next ( ) ;
29
+ }
28
30
return next ( msg || 'not-equal-to-property' ) ;
29
31
} ;
30
32
} ;
@@ -49,17 +51,24 @@ validators.unique = function () {
49
51
50
52
for ( k in arguments ) {
51
53
arg = arguments [ k ] ;
52
- if ( typeof arg === 'string' ) msg = arg ;
53
- else if ( typeof arg === 'object' ) opts = arg ;
54
+ if ( typeof arg === "string" ) {
55
+ msg = arg ;
56
+ } else if ( typeof arg === "object" ) {
57
+ opts = arg ;
58
+ }
54
59
}
55
60
56
61
return function ( v , next , ctx ) {
57
- var s , scopeProp ;
62
+ var s , scopeProp ;
58
63
59
- if ( typeof v === 'undefined' || v === null ) return next ( ) ;
64
+ if ( typeof v === "undefined" || v === null ) {
65
+ return next ( ) ;
66
+ }
60
67
61
- //Cannot process on database engines which don't support SQL syntax
62
- if ( ! ctx . driver . isSql ) return next ( 'not-supported' ) ;
68
+ //Cannot process on database engines which don't support SQL syntax
69
+ if ( ! ctx . driver . isSql ) {
70
+ return next ( 'not-supported' ) ;
71
+ }
63
72
64
73
var chain = ctx . model . find ( ) ;
65
74
You can’t perform that action at this time.
0 commit comments