Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 5988687
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T22:59:35+00:00 2026-05-22T22:59:35+00:00

I am trying benjamin’s keens RSV validation script (jquery version), but with an own

  • 0

I am trying benjamin’s keens RSV validation script (jquery version), but with an own function it doesn’t work. my custom function returns false but the oncompletehandler is still called??

$("#testForm").RSV({
    onCompleteHandler: myOnComplete,
    displayType: "alert-one",
    rules: [
      "required,first_name,Please enter your first name.",
    "required,last_name,Please enter your last name.",
    "required,email,Please enter your email address.",
    "valid_email,email,Please enter a valid email address.",
      "function,testfunct",

    ]
  });




function testFunc() {
        tmpName = $('#tmpName').val();
        if (tmpName != '') {
            //alert ("name has been set");
            return true;
        }
        else {
            alert ("Credit card empt");
            $('#tmpName').focus();
            return false;
            }
     }`
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T22:59:36+00:00Added an answer on May 22, 2026 at 10:59 pm

    Your customized function is not correct. It is expected to return:

    • true when validation passed.
    • an array (but not “false”) when validation failed.

    more details please refer to its official document , then click the item: “Custom validation rules”

    In order for your function to interact properly with the RSV script, your function must have a well-defined return value. Namely:

    If the field passes whatever test or tests you administer, it must explicitly return true.
    If it fails the test(s), it has to return an array of arrays, like so:

     return [[node1, "error message1"], [node2, "error message2"], [node3, "error message3"]];
    

    Or if your function is just throwing a single error:

     return [[node, "error message"]];
    

    Note the double [[ and ]]. That’s a not a typo!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

trying to work out how to install zipArchive extension with MAMP, but not having
Trying to send a PHP email the easy way but I cannot work out
Trying to do this sort of thing... WHERE username LIKE '%$str%' ...but using bound
Trying to get Thin working with Bundle on Windows, I know, major PITA but
Trying to load a page fragment, or at least jump to a div but
Trying to get jquery AutoComplete to return and populate it's dropdown. The input and
Trying to import a custom UITableViewCell and it keeps giving me a file not
Trying to create an array of structs (new to C), but I am getting
Trying to set RowHeight like this(in code): dgvTruckAvail.RowTemplate.Height = 48; Doesnt' work. I also
Trying to figure out how to do this. I have the style but I'd

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.