Skip to content

Commit ae41a15

Browse files
committed
Added support to set up a validate options for validate() in "form" type
1 parent 0b3f50d commit ae41a15

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/dform.extensions.js

+4-1
Original file line numberDiff line numberDiff line change
@@ -541,6 +541,8 @@
541541
}
542542
};
543543
}
544+
if (typeof (options.validate) == 'object')
545+
$.extend(defaults, options.validate);
544546
this.validate(defaults);
545547
}
546548
},
@@ -555,7 +557,8 @@
555557
*/
556558
"validate" : function(options, type)
557559
{
558-
this.rules("add", options);
560+
if (type != "form")
561+
this.rules("add", options);
559562
}
560563
});
561564

0 commit comments

Comments
 (0)