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 7983967
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T11:07:16+00:00 2026-06-04T11:07:16+00:00

I’m completely stuck with this one, and I’d love advice on either what I’m

  • 0

I’m completely stuck with this one, and I’d love advice on either what I’m doing wrong or what more I can do to debug the problem.

I have jquery validate engine validating a form.
For example the code to check if a screenname exists is as follows;

<input value="[% fields.screenname | html %]" placeholder="Screenname" 
                onclick="$('#screenname').validationEngine('showPrompt', 'For example: JohnDoe_68.', 'load')" 
                class="validate[required,custom[onlyLetterNumber],maxSize[41],ajax[ajaxNameCallPerlScreenname]]" 
                name="screenname" id="screenname" type="text" size= "41" maxlength="24" data-prompt-position="centerRight"/>

The call to validation engine is

jQuery(document).ready(function(){
jQuery("#register").validationEngine('attach', 'autoHidePrompt', {
    promptPosition : "topRight", 
    scroll: "false",
    ajaxFormValidation : "true",
    onBeforeAjaxFormValidation: "beforeCall",
    onAjaxFormComplete: "ajaxValidationCallback"
    });
});

At this stage the beforeCall and ajaxValidationCallback functions are straight from the demo and never get called anyway so I won’t include them here.

On the server side I have a simple script checking to see if that username is taken and returning json (utf8 encoded) via a script written in perl. The relevant code is;

use utf8;
my $output;
eval { $output = JSON::XS->new->utf8->encode( $data ); };
if($@)
{
    use Carp;
    confess($@);
}
warn "Form Output is " . $output;
$self->discard_request_body();
$self->req->content_type('application/json; charset=utf-8');
$self->req->headers_out->set( 'Expires' => 'Thu, 1 Jan 1970 00:00:00 GMT' );

$self->req->headers_out->set( 'Content-Length' => length $output );
$self->req->print($output);

And this is where the trouble starts.
In chrome and firefox I can see the validation request hit the server,
I can see the correct response get sent back to the browser,
I can look at the response in the browser which is correct (I think) and like this

[["screenname","false","That user name is already taken. Please try again."]]

however the actual onAjaxFormComplete is never called. If I set breakpoints in beforeCall and ajaxValidationCallback functions they are never called.

Headers are as follows;

Response Headers
Connection  Keep-Alive
Content-Encoding    gzip
Content-Length  89
Content-Type    application/json; charset=utf-8
Date    Sat, 19 May 2012 19:47:28 GMT
Expires Thu, 1 Jan 1970 00:00:00 GMT
Keep-Alive  timeout=15, max=100
Server  Apache/2.2.16 (Debian)
Vary    User-Agent,Accept-Encoding
X-UA-Compatible chrome=1
X-What-Alias    flooting
Request Headers
Accept  application/json, text/javascript, */*; q=0.01
Accept-Encoding gzip, deflate
Accept-Language en-us,en;q=0.5
Connection  keep-alive
Cookie  flooting_session=be8aec0e39f12ee031c9103072b19a66
Host    six.flooting.com
Referer http://six.flooting.com/register
User-Agent  Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:12.0) Gecko/20100101      Firefox/12.0
X-Requested-With    XMLHttpRequest

So that’s about all I can tell you at the moment. I think I’m missing something very simple in the way I’m configuring the callback functions, but I’ve been banging my head against this for some time and I’m not any closer to an answer.

Note beforeCall is not called prior to the ajax request, however I’ve set breakpoints in validationEngine at the appropriate section of code (where beforeCall should be called), and execution never reaches it. Doesn’t even make it to the parent function.

Anyone see what I’m missing?

  • 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-06-04T11:07:18+00:00Added an answer on June 4, 2026 at 11:07 am

    I’ve found the answer,
    In the documentation for validation engine it says you must return an array of arrays for form validation and an array for field validation. I was returning an array of arrays when I should have been returning an array.

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

Sidebar

Related Questions

I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I have a jquery bug and I've been looking for hours now, I can't
this is what i have right now Drawing an RSS feed into the php,
I have this code to decode numeric html entities to the UTF8 equivalent character.
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I have this code: - (void)parser:(NSXMLParser *)parser foundCDATA:(NSData *)CDATABlock { NSString *someString = [[NSString
This could be a duplicate question, but I have no idea what search terms
Does anyone know how can I replace this 2 symbol below from the string
I have a .ini file as follows: [playlist] numberofentries=2 File1=http://87.230.82.17:80 Title1=(#1 - 365/1400) Example
link Im having trouble converting the html entites into html characters, (&# 8217;) i

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.