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

TOPIC:

[FIXED] jqv:custom rule not found - decimal_10_2 17 Nov 2012 15:00 #5437

Hi,

I've read the other posts - but I couldn't fix it (but I am new to this). In my case its with a basic decimal data type.

Changing MTools to Jquery did not fix.

I was intending to use the decimal record for a currency field (cost ie: 55.00).

Validation is not set (Validator: None). I did play around with some of the built in validation, but reset it to none when having these problems.

Using Cook 2.0

Form Style :Condensed
Features: Reduced
TODO: Yes

DB automatisms: Model
Timeout loading: 20 Seconds.

Thanks
Just call me Chris :)

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

Last edit: by organicwebs. Reason: more setting info

Re: jqv:custom rule not found - decimal_10_2 17 Nov 2012 19:04 #5439

  • JoomGuy
  • JoomGuy's Avatar
  • Offline
  • Moderator
  • Moderator
  • Joomla Enthusiast, Lover of Cooking
  • Posts: 1115
  • Thank you received: 195
Hi @bottomupwebs,

Did you rebuild your project/files after switching JS from MooTools to jQuery?

Have you looked for further info in the console (dev tools/firebug)? Could you post the full error please?

I also needed a decimal validation for measurements and price as you do: correct to 2 decimal places. I also wanted to prevent free products (0.00). I therefore had to go down the custom validation route...

To find out more, please see:http://j-cook.pro/forum/34-regular-expressions/5314-validate-decimal-must-be-positive?limit=10&start=10#5438

Hope it helps!

Gez
Need help with your Cook/Joomla Project? . PM me to find out what I can help with. NO time wasters please!!!
The following user(s) said Thank You: organicwebs

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

Re: jqv:custom rule not found - decimal_10_2 19 Nov 2012 03:26 #5481

Hi Gez, thanks for the reply.

After changing the settings, I'm clicking on "Download component" and installing it on my server - I figured that was rebuilding right?

When using the form on the front end, a lightbox type windows pops up with "jqv:custom rule not found - decimal_10_2". Message via Joomla messages is " Validation Rule missing: decimal_10_2"

Using the console in Firebug, I don't see any errors or warnings.

I'm working on it again today, will test a few more things out.

Thanks for the link - might need that later.

Cheers
Chris
Just call me Chris :)

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

Last edit: by organicwebs. Reason: more info

Re: jqv:custom rule not found - decimal_10_2 19 Nov 2012 06:56 #5483

Hi Chaps,

Even after removing the decimal fields from the table (and page) - I still got the error. :S

So I think I might have landed on a bug with the JCook builder.

Decimal fields in any other table worked fine.

What might have triggered this bug was that I was using a numeric character in the decimal field name. Ie: invoice_line_1 and invoice_line_2. I had to save and then rename to achieve this. I was probably using validation at the time of saving (nothing complicated - just the defaults).

Maybe that left some residual code in the generated files.

To fix, I deleted the entire table and rebuild it using apha characters for the decimal numeric field names - ie: invoice_line_a, invoice_line_b

Cheers
PS: Complements to the Chef - this is a fabulous tool to use! It saves me loads to time.
Just call me Chris :)

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

Re: jqv:custom rule not found - decimal_10_2 19 Nov 2012 09:00 #5484

  • JoomGuy
  • JoomGuy's Avatar
  • Offline
  • Moderator
  • Moderator
  • Joomla Enthusiast, Lover of Cooking
  • Posts: 1115
  • Thank you received: 195
Hi @bottomupwebs,

After changing the settings, I'm clicking on "Download component" and installing it on my server - I figured that was rebuilding right?

Yes, but you may want to click the Rebuild Files link in your project's main window first just to be sure...

I think that this is a bug in V2.0 Cook. I may be wrong here but, I think that something else must have changed other than your field names if it is working now as I don't see how removing a digit in place of a letter would change anything.

I would recommend looking at the link in any case but, I'm glad you got it fixed!

Gez
Need help with your Cook/Joomla Project? . PM me to find out what I can help with. NO time wasters please!!!

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

Re: jqv:custom rule not found - decimal_10_2 21 Nov 2012 13:22 #5561

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 986
The problem is not the numbers, but the underscores '_'.

Do not use the underscores in the validator handler.
This is an issue to fix in 1.5. I know.

You can make it working. TODO :
- Turn back to a custom mode.
- Remove the underscores in the handler automatic generated alias.

Sorry for inconvenience
Coding is now a piece of cake
The following user(s) said Thank You: organicwebs

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

Re: jqv:custom rule not found - decimal_10_2 15 Dec 2012 16:11 #6129

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 986
Fixed in builder. Not anymore '_' in the default aliases.
Coding is now a piece of cake
The following user(s) said Thank You: JoomGuy

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

Re: jqv:custom rule not found - decimal_10_2 14 Jan 2013 19:34 #6444

this is fixed here, but not in file upload I added a image field and when try to APPLY show a file_9999 custom rule not found.. I did remove the _ from the xml but still got the error but without the underscore.

Any Idea?

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

Re: jqv:custom rule not found - decimal_10_2 14 Jan 2013 19:46 #6445

  • JoomGuy
  • JoomGuy's Avatar
  • Offline
  • Moderator
  • Moderator
  • Joomla Enthusiast, Lover of Cooking
  • Posts: 1115
  • Thank you received: 195
Hi @soportedo

did you remove it from both the validate & class attributes in the XML? If not, double check that a file, named admin/models/rules//[the_rule_name(without an underscore, '_')].php and that the rule class name in the relevant file is named accordingly.

BTW, are you usng jQuery & Cook V2.0b?

G
Need help with your Cook/Joomla Project? . PM me to find out what I can help with. NO time wasters please!!!

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

Last edit: by JoomGuy.

Re: jqv:custom rule not found - decimal_10_2 14 Jan 2013 20:08 #6446

Hi @audibleid

In the admin/models/rules theres only "file.php" not file_nnnn.php"
BTW I did copy the file.php to file_nnnn.php and the same error

tried:

file_nnnn.php
filennnn.php
and file.php


same error....

Thnaks

PS: Usign jQuery and Version 2.0b

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

Re: jqv:custom rule not found - decimal_10_2 14 Jan 2013 20:18 #6447

  • JoomGuy
  • JoomGuy's Avatar
  • Offline
  • Moderator
  • Moderator
  • Joomla Enthusiast, Lover of Cooking
  • Posts: 1115
  • Thank you received: 195
Sorry, I may have got it wrong about the file naming convention of rules files... What about the class names in the file?
Need help with your Cook/Joomla Project? . PM me to find out what I can help with. NO time wasters please!!!

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

Re: jqv:custom rule not found - decimal_10_2 14 Jan 2013 20:39 #6448

no class name with file_nnnn can you point me where to llok?

thanks

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

Re: jqv:custom rule not found - decimal_10_2 15 Jan 2013 10:46 #6452

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 986
Underscore is not allowed in rules, but Cook is using them to furnish some dynamic parameters to the JS.
Underscore + rand number = validator suffix.


Explaination
Field 1 :
type = file
allowed types = *png|*.jpg


Field 2 :
type = file
allowed types = *tif|*.gif

The Javascript is naming a rule with an unique alias in order to distinct them.

The suffix is keept for the front JS validator
The suffix is ignored for the PHP rule file.
Coding is now a piece of cake

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

Re: jqv:custom rule not found - decimal_10_2 15 Jan 2013 10:57 #6454

Hi admin, I understand your answers, and the validation is working with number, strings, passwords, etc.
but with the Upload component is not working.... eve if I remove the underscore.

What I'm doing wrong?

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

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

Although I found this tool some time ago I just started learning experimenting and building this first component on Monday and now on Thursday afternoon it's already online. Although I already had a working version done with another tool this is much easier to build and at the end you have the freedom to own your own component. Once you know how to use Cook you will boost your productivity as the learning curve is really moderate compared to many other tools.
Giori (Forum)

Get Started