|
@ -48,7 +48,6 @@ $.fn.form = function(parameters) { |
|
|
settings, |
|
|
settings, |
|
|
validation, |
|
|
validation, |
|
|
|
|
|
|
|
|
namespace, |
|
|
|
|
|
metadata, |
|
|
metadata, |
|
|
selector, |
|
|
selector, |
|
|
className, |
|
|
className, |
|
@ -68,8 +67,10 @@ $.fn.form = function(parameters) { |
|
|
|
|
|
|
|
|
// settings grabbed at run time
|
|
|
// settings grabbed at run time
|
|
|
module.get.settings(); |
|
|
module.get.settings(); |
|
|
|
|
|
|
|
|
if(methodInvoked) { |
|
|
if(methodInvoked) { |
|
|
|
|
|
if(instance === undefined) { |
|
|
|
|
|
module.instantiate(); |
|
|
|
|
|
} |
|
|
module.invoke(query); |
|
|
module.invoke(query); |
|
|
} |
|
|
} |
|
|
else { |
|
|
else { |
|
@ -342,8 +343,8 @@ $.fn.form = function(parameters) { |
|
|
} |
|
|
} |
|
|
else { |
|
|
else { |
|
|
// 2.x
|
|
|
// 2.x
|
|
|
settings = $.extend(true, {}, $.fn.form.settings, parameters), |
|
|
|
|
|
validation = $.extend({}, $.fn.form.settings.defaults, settings.fields), |
|
|
|
|
|
|
|
|
settings = $.extend(true, {}, $.fn.form.settings, parameters); |
|
|
|
|
|
validation = $.extend({}, $.fn.form.settings.defaults, settings.fields); |
|
|
module.verbose('Extending settings', validation, settings); |
|
|
module.verbose('Extending settings', validation, settings); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
@ -441,7 +442,7 @@ $.fn.form = function(parameters) { |
|
|
} |
|
|
} |
|
|
if(isCheckbox) { |
|
|
if(isCheckbox) { |
|
|
if(isChecked) { |
|
|
if(isChecked) { |
|
|
values[name].push(value) |
|
|
|
|
|
|
|
|
values[name].push(value); |
|
|
} |
|
|
} |
|
|
else { |
|
|
else { |
|
|
module.debug('Omitted unchecked checkbox', $field); |
|
|
module.debug('Omitted unchecked checkbox', $field); |
|
@ -949,7 +950,7 @@ $.fn.form.settings = { |
|
|
name : 'Form', |
|
|
name : 'Form', |
|
|
namespace : 'form', |
|
|
namespace : 'form', |
|
|
|
|
|
|
|
|
debug : false, |
|
|
|
|
|
|
|
|
debug : true, |
|
|
verbose : false, |
|
|
verbose : false, |
|
|
performance : true, |
|
|
performance : true, |
|
|
|
|
|
|
|
@ -1066,7 +1067,7 @@ $.fn.form.settings = { |
|
|
|
|
|
|
|
|
// is not empty or blank string
|
|
|
// is not empty or blank string
|
|
|
empty: function(value) { |
|
|
empty: function(value) { |
|
|
return !(value === undefined || '' === value || $.isArray(value) && value.length == 0); |
|
|
|
|
|
|
|
|
return !(value === undefined || '' === value || $.isArray(value) && value.length === 0); |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
// is valid integer
|
|
|
// is valid integer
|
|
|