-
Notifications
You must be signed in to change notification settings - Fork 12
jQuery Form Validate Settings Object
vmichnowicz edited this page Feb 8, 2013
·
1 revision
Everything in jQuery Form Validate can be customized and configured through the modification of the settings object. This object can be modified on a both a global and local scope. Modifying a method or property on a global scope affects all form validation instances on the page. If you only need to modify some settings for an individual form then settings can be applied locally.
Global modification of the settings object can be accomplished through $.extend()
jQuery.extend(true, jQuery.fn.formvalidate.options {
preProcess: function() {
// Do something cool...
},
onSuccess: function() {
alert('Great success!');
},
inputFailureClass: 'epic-failz0rz'
});
$('form').submit(function(e) {
e.preventDefault();
$(this).formvalidate({
preProcess: function() {
// Do something cool...
},
onSuccess: function() {
alert('Great success!');
},
inputFailureClass: 'epic-failz0rz'
});
});
- preProcess
- postProcess
- onSuccess
- onFailure
- messageParent
- messageElement
- failureMessages
- successMessages
- messageFailureClass
- messageSuccessClass
- inputFailureClass
- inputSuccessClass
- cssParamDelimiter
- language
- localization
- en
- success
- default
- betweenNumeric
- date
- numChars
- minChars
- maxChars
- numOptions
- minOptions
- maxOptions
- int
- float
- required
- requiredIf
- lessThan
- greaterThan
- failure
- default
- success
- en
- filters
- trim
- strtoupper
- strtolower
- validations
- betweenNumeric
- date
- dateAfter
- dateBefore
- numChars
- minChars
- maxChars
- numOptions
- minOptions
- maxOptions
- int
- float
- required
- requiredIf
- lessThan
- greaterThan