Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC:

[FIXED] jquery validation error... 17 Aug 2012 14:35 #3180

I have the following jquery validation error:

Error: jQuery.validationEngine rules are not loaded, plz add localization files to the page.


Does anyone know what can be? I'm asking to see if I do not waste much time trying to solve this!

Please Log in or Create an account to join the conversation.

Last edit: by admin.

Re: jquery validation error... 17 Aug 2012 15:24 #3181

this,

File: helpers / html / validator.php line # 68

Original: $ entries [] = "'." $ key. "'" ". $ Q. $ Value. $ Q;
Fixed: $ entries [] = '"'. $ Key. '"'. $ q. $ value. $ q;

Only reversed the quotes, ie, where it was single quotes put quotes. For time to render the code, display quotes and not single quotes.
This has happened to me before, do not know if the same file. But the rendering code draws the (') single quotation marks the beginning of each row of the array causing an error in javascript

the javascript code was well
<script type="text/javascript">
(function($){$.fn.validationEngineLanguage = function(){};$.validationEngineLanguage = {newLang: function(){$.validationEngineLanguage.allRules = {
required' : {
regex' : 'none',
alertText' : '<span class="msg-prefix">• </span>Este campo é obrigatório',
alertTextCheckboxMultiple' : '<span class="msg-prefix">• </span>Por favor, selecione uma opção',
alertTextCheckboxe' : '<span class="msg-prefix">• </span>Esta caixa de seleção é necessária',
alertTextDateRange' : '<span class="msg-prefix">• </span>Ambos os campos são obrigatórios intervalo de datas'
} ...

Note that the single quotes the beginning of each line disappear.

That's it!

Please Log in or Create an account to join the conversation.

Last edit: by ivojunior.

Re: jquery validation error... 17 Aug 2012 18:24 #3182

this file too:

dom/html/form/input.php line #397

$entries[] = '"' . $key . '" : ' . $q . $value . $q;

Please Log in or Create an account to join the conversation.

Re: jquery validation error... 18 Aug 2012 21:00 #3187

Now with the following error:

Create a field that only accepts 15 characters. then the input:

JDom :: _ ('html.form.input.text', array (
"Datakey '=>' abbr '
'dataObject' => $ this-> entry,
'size' => "5",
'domClass' => "validate [custom [length_15]]"
'validatorHandler' => 'length_15 "
'validatorMsgIncorrect' => 'SOURCES_VALIDATOR_ABBREVIATIONS_SHOULD_HAVE_A_MAXIMUM_OF_15_CHARACTERS "
'validatorRegex' => '/ ^. {0.15} $ / "
));

In the source code browser:

$. validationEngineLanguage.newLang ();}) (jQuery);
$. validationEngineLanguage.allRules.length_15 = {
"regex": new RegExp ("^. {0.15} $",''),
Uncaught TypeError: Can not read property 'allRules' of undefined
"alertText": "<span class="msg-prefix"> • </ span> Abbreviation only 15! '
}

ERROR:
"can not read property 'allRules' of undefined

and now?

for now I removed the validations ...

Please Log in or Create an account to join the conversation.

Re: jquery validation error... 18 Aug 2012 22:34 #3189

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 986
Thanks for your contribution.

The problem with quotes is fixed.



About your custom regex, you have a syntax error :
'validatorRegex' => "/^.{0.15}$/"

should be :
'validatorRegex' => "/^.{0,15}$/"
Coding is now a piece of cake

Please Log in or Create an account to join the conversation.

Last edit: by admin.

Re: jquery validation error... 18 Aug 2012 22:38 #3190

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 986
And also :

Original: $ entries [] = "'." $ key. "'" ". $ Q. $ Value. $ Q;
Fixed: $ entries [] = '"'. $ Key. '"'. $ q. $ value. $ q;


Re-Fixed :
$entries[] = '"'. $key. '" : '. $q. $value. $q;

You've missed the " : " that separate the key from the value. So for sure you get a JS issue and allRules var is not defined.

Is it fixed for you ?
Coding is now a piece of cake

Please Log in or Create an account to join the conversation.

  • Page:
  • 1
Time to create page: 0.135 seconds

I jumped and started to work on a demo component... but 2 days later this demo component became the real component. I just showed today the end result to my customer and he turned to me and said... "this is more than I expected"... All of this is because Cook did cut about 70% of my work and provided me more ways to improve the usability of the component. The end result was 17 tables all related between than to generate a full dashboard for the travel agents. Thanks for Cook developers for such great tool. This component would not be possible to be done at short time with all the features in it
Griiettner (Forum)  

Get Started