Browse Source

Merge remote-tracking branch 'origin/master'

Conflicts:
	README.md
	dist/js/bootstrapValidator.min.js
	src/js/validator/callback.js
nghuuphuoc 11 years ago
parent
commit
06fb5f212a
3 changed files with 16 additions and 1 deletions
  1. 7 0
      README.md
  2. 5 1
      dist/js/bootstrapValidator.min.js
  3. 4 0
      src/js/validator/callback.js

+ 7 - 0
README.md

@@ -296,7 +296,10 @@ $(form).bootstrapValidator({
 
 
 For Rails, the input field is constructed from model name and field name. For Example, User have email as field, when form helper render
 For Rails, the input field is constructed from model name and field name. For Example, User have email as field, when form helper render
 view, the input field name will be 'user[email]'. The syntax for these is somewhat different as shown below:
 view, the input field name will be 'user[email]'. The syntax for these is somewhat different as shown below:
+<<<<<<< HEAD
 
 
+=======
+>>>>>>> c025cbea8fc37eb3c7b6c2d3dad0b670a5de40b6
 ```javascript
 ```javascript
 $(form).bootstrapValidator({
 $(form).bootstrapValidator({
     fields: {
     fields: {
@@ -310,6 +313,10 @@ $(form).bootstrapValidator({
 });
 });
 ```
 ```
 
 
+<<<<<<< HEAD
+=======
+
+>>>>>>> c025cbea8fc37eb3c7b6c2d3dad0b670a5de40b6
 To see how built-in validators are developed, you can look at their sources located at the [```src/js/validator```](src/js/validator) directory.
 To see how built-in validators are developed, you can look at their sources located at the [```src/js/validator```](src/js/validator) directory.
 
 
 ## Build
 ## Build

File diff suppressed because it is too large
+ 5 - 1
dist/js/bootstrapValidator.min.js


+ 4 - 0
src/js/validator/callback.js

@@ -17,9 +17,13 @@
         validate: function(validator, $field, options) {
         validate: function(validator, $field, options) {
             var value = $field.val();
             var value = $field.val();
             if (options.callback && 'function' == typeof options.callback) {
             if (options.callback && 'function' == typeof options.callback) {
+<<<<<<< HEAD
                 var dfd = new $.Deferred();
                 var dfd = new $.Deferred();
                 dfd.resolve(options.callback.call(this, value, validator), 'callback');
                 dfd.resolve(options.callback.call(this, value, validator), 'callback');
                 return dfd;
                 return dfd;
+=======
+                return options.callback.call(this, value, validator);
+>>>>>>> c025cbea8fc37eb3c7b6c2d3dad0b670a5de40b6
             }
             }
             return true;
             return true;
         }
         }