Click here to Skip to main content
13,045,657 members (68,339 online)
Rate this:
Please Sign up or sign in to vote.
Dear Experts,

I am Stuck in my project,

I am Using JQuery Validation in my project.. And i have Include some Javascript files and also a small piece of javascript code in my Index.aspx page.. Here is the below Code....


And When i click the submit button it validates the fields.

One of the Javascript file contains a function to validate. And it returns a boolean, if the form get error then it returns False else True.....

I just put an alert in that function and i successfully got the return boolean.

Here is the Below Code.. (This code is in "jquery.validationEngine.js" file)

_onSubmitEvent: function () {
			var form = $(this);
			var options ='jqv');
			options.eventTrigger = "submit";
			// validate each field 
			// (- skip field ajax validation, not necessary IF we will perform an ajax form validation)
			var r=methods._validateFields(form);
			if (r && options.ajaxFormValidation) {
				methods._validateFormWithAjax(form, options);
				// cancel form auto-submission - process with async call onAjaxFormComplete
				return false;
			if(options.onValidationComplete) {
				// !! ensures that an undefined return is interpreted as return false but allows a onValidationComplete() to possibly return true and have form continue processing
				return !!options.onValidationComplete(form, r);
			return r;

I need to get this return boolean in my Index.aspx page.....

Is there any Javascript code to get the return value....

Please help me..

Thanks and Regards,

Posted 3-Apr-13 7:29am
ryanb31 3-Apr-13 15:02pm
I am confused. Where do you want the return value? Your code is already returning r or false, or !!options...
Rate this: bad
Please Sign up or sign in to vote.

Solution 1


Rather than attaching the validation engine to a form you can use .validate method in your own submit handler. That way you can chose to take an appropriate action based on the return value. See doc here[^]

dilzz 4-Apr-13 1:06am
Thank You Sir.... Its Working..... Thanks a lot... :)
Rate this: bad
Please Sign up or sign in to vote.

Solution 2

You Can Refer This Website for validation engine[^]


This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web02 | 2.8.170713.1 | Last Updated 4 Apr 2013
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100