jquery-validation-unobtrusive icon indicating copy to clipboard operation
jquery-validation-unobtrusive copied to clipboard

Not all options are passed to jquery-validation

Open lukos opened this issue 8 months ago • 0 comments

Where the options object is created, not all options are passed down to jquery-validation, which means some things are not overridable. The three that I have added manually are ignore, highlight and unhighlight. Should be easy enough to add them (not sure if there is a reason why all options are not available for override):

options: {  // options structure passed to jQuery Validate's validate() method
	ignore: defaultOptions.ignore,
	errorClass: defaultOptions.errorClass || "input-validation-error",
	errorElement: defaultOptions.errorElement || "span",
	errorPlacement: function () {
		onError.apply(form, arguments);
		execInContext("errorPlacement", arguments);
	},
	invalidHandler: function () {
		onErrors.apply(form, arguments);
		execInContext("invalidHandler", arguments);
	},
	messages: {},
	rules: {},
	success: function () {
		onSuccess.apply(form, arguments);
		execInContext("success", arguments);
	},
	highlight: defaultOptions.highlight,
	unhighlight: defaultOptions.unhighlight
},

lukos avatar May 01 '25 08:05 lukos