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.089 seconds

  I found "cook" two days ago. Played around with it for a day and then within a day got rid of two legacy applications in IBM Lotus Domino Notes and replaced them with "cook". It was really easy. A piece of cake. Actually it was even easier than cooking. Cooking involves more work than developing with "cook". What can I say about "cook"? Great application great price for what it delivers great forum with a lot of information and fast responses active and friendly community fast forward moving development cycle So what should I say "Monsieur Le Cook"? Keep the good work going it will lead to success. Having become a paying member in the words of Edith Piaf may I say ..... non rien de rien ... je ne regrette rien. Vive La France.
FK (JED)
         

Get Started