Skip to content

Not all options are passed to jquery-validation #175

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
lukos opened this issue May 1, 2025 · 0 comments
Open

Not all options are passed to jquery-validation #175

lukos opened this issue May 1, 2025 · 0 comments

Comments

@lukos
Copy link

lukos commented May 1, 2025

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
},
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant