Welcome, Guest
Username: Password: Remember me

TOPIC: [FIXED] jquery validation error...

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

  • ivojunior
  • ivojunior's Avatar
  • Offline
  • New Member
  • Posts: 7
  • Thank you received: 2
  • Karma: 1
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!
Last Edit: 21 Aug 2012 08:29 by admin.
The administrator has disabled public write access.

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

  • ivojunior
  • ivojunior's Avatar
  • Offline
  • New Member
  • Posts: 7
  • Thank you received: 2
  • Karma: 1
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!
Last Edit: 17 Aug 2012 18:25 by ivojunior.
The administrator has disabled public write access.

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

  • ivojunior
  • ivojunior's Avatar
  • Offline
  • New Member
  • Posts: 7
  • Thank you received: 2
  • Karma: 1
this file too:

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

$entries[] = '"' . $key . '" : ' . $q . $value . $q;
The administrator has disabled public write access.

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

  • ivojunior
  • ivojunior's Avatar
  • Offline
  • New Member
  • Posts: 7
  • Thank you received: 2
  • Karma: 1
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 ...
The administrator has disabled public write access.

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

  • admin
  • admin's Avatar
  • Online
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 985
  • Karma: 140
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
Last Edit: 18 Aug 2012 22:36 by admin.
The administrator has disabled public write access.

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

  • admin
  • admin's Avatar
  • Online
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 985
  • Karma: 140
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
The administrator has disabled public write access.
Time to create page: 0.170 seconds

Get Started