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

TOPIC:

[CLOSED] jqv:custom rule not found image 17 Oct 2012 13:10 #4627

  • smarano
  • smarano's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
  • Posts: 33
  • Thank you received: 1
Hello,
on the validation of a field "image" (of type "image picker" or "file uploader"), there is the following problem in javascript: "jqv: custom rule not found". Reading the various topics, say it is a problem of regex, but nothing more. Someone can give me more information? Someone managed to solve this problem?

thanks

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

Last edit: by admin.

Re: In Version 1.5 - jqv:custom rule not found image 17 Oct 2012 13:17 #4628

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 986
Migrate to 2.0 if you can.

This issues will not be anymore fixed on 1.5

Workaround: remove the validation for this field :

Remove the class on the field :
validate[custom[file]]
Coding is now a piece of cake

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

Last edit: by admin.

Re: In Version 1.5 - jqv:custom rule not found image 17 Oct 2012 13:34 #4629

  • smarano
  • smarano's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
  • Posts: 33
  • Thank you received: 1
I will continue to use version 1.5, because I want the component to remain compatible with versions 1.6, 1.7 and 2.5 of joomla and also because in version 2.0 I have other problems. I think your solution is just a bypass of the problem, I would try to solve it at all.
Thank you very much.

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

Re: In Version 1.5 - jqv:custom rule not found image 17 Oct 2012 13:43 #4630

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 986
V2.0 is also compatible 1.6 and 1.7.

It is not written, but it works because it is the same 11.x Plateform.
Coding is now a piece of cake
The following user(s) said Thank You: smarano

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

Re: In Version 1.5 - jqv:custom rule not found image 17 Oct 2012 13:50 #4631

  • smarano
  • smarano's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
  • Posts: 33
  • Thank you received: 1
ah! thanks for the information, I did not know! :)

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

Re: In Version 1.5 - jqv:custom rule not found image 17 Oct 2012 14:04 #4632

  • smarano
  • smarano's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
  • Posts: 33
  • Thank you received: 1
in version 2.0 have the same problem: "jqv: custom rule not found - file_5278" more gives me a problem with the validation of a decimal field: "Validation Rule missing: decimal_10_2", the decimal value of the field is "22.44"

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

Re: In Version 1.5 - jqv:custom rule not found image 17 Oct 2012 15:37 #4635

  • JoomGuy
  • JoomGuy's Avatar
  • Offline
  • Moderator
  • Moderator
  • Joomla Enthusiast, Lover of Cooking
  • Posts: 1115
  • Thank you received: 195
Is this a custom rule you've created? If so...

You should rename the handler without the underscores... Joomla/cook conventions strip them out.

rename it to something like decimal10to2

Also, see some posts that I made here for advice on validating with custom regex in COOK ...

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: smarano

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

Re: In Version 1.5 - jqv:custom rule not found image 17 Oct 2012 17:47 #4636

  • smarano
  • smarano's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
  • Posts: 33
  • Thank you received: 1
Audibleid Thank you, your support is important. With regard to the following problem "jqv: custom rule not found - file_5278" did not find any solution?

+1 Karma :)

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

Re: In Version 1.5 - jqv:custom rule not found image 17 Oct 2012 19:53 #4637

  • smarano
  • smarano's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
  • Posts: 33
  • Thank you received: 1
however, I concluded not to make mandatory field and set a default value (an image) and then remove the validation as the administrator said. In this way does not come out the annoying javascript error!

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

Re: In Version 1.5 - jqv:custom rule not found image 18 Oct 2012 05:44 #4638

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

Your error

jqv: custom rule not found - file_5278


Is this a custom rule?

I also experienced similar errors last night with fields that were working previously and they had not changed since the day before.

@admin - have you changed anything?

Previously, whenever I've experienced the jqv custom rule errors, it's been due to a badly named handler or a malformed regex.

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.

Last edit: by JoomGuy.

Re: In Version 1.5 - jqv:custom rule not found image 18 Oct 2012 07:20 #4639

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 986
I think it is not a custom rule.

Now, to handle different possibles extensions types in same page, there is something new.

When you use underscore, it keeps only the first part, but the whole name is used as JS handler name.

ex :
file_5278

Rule : file
Instance name (Rand number) : 5278
JS validator handler : file_5278

It looks tricky, but it is only for particular cases to share a unique rule file when :
- The regex is dynamic depending on the field
- The messages errors can be dynamically changed.

Please check your javascript and tell me if you can see theses file validations.
Coding is now a piece of cake

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

Re: In Version 1.5 - jqv:custom rule not found image 18 Oct 2012 07:53 #4640

  • smarano
  • smarano's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
  • Posts: 33
  • Thank you received: 1
Even if you do not personalize, if you look at the code seems to do a custom validation 'domClass' => 'validate [custom [file_2200]]'. However, just remove the validation 'domClass' =>'', make the field not required and set a default image, doing it this way no longer uses the validation js but uses validation php and everything works fine.

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

Re: In Version 1.5 - jqv:custom rule not found image 18 Oct 2012 08:13 #4642

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 986
Yes, because the validation is called this way :

validate => 'file'
Means the rule 'file' will be loaded (both JS and PHP), we speak about the physical rule file class

This rule will instance a Javascript code with a name for handling it : file_2200

domClass => validate[custom[file_2200]]
Is calling this javascript snipplet written throught the rule class (As many snipplets are wrote as there are different validation behaviors, because it is not possible to keep the same)

ruleInstance => file_2200
Is the value sent to the rule in order to know this name. It make double use, but for the moment I must leave this. My problem is that de fields and the rules cannot call each others (Totally separated code in static, so it is difficult to play with it)

All this is not really easy. I promise you it is difficult and I do not understand why Joomla is so painfull to reallize JS front validation.

I work on that, and will fix all these annoying issues soon.
The way to make it working can change a little bit, it is not stable and not 100% clean for the moment.
When I find a better way, I will update the source.

Anyway, the PHP validation works like a charm (when regex is good of course), so the validation can be skipped for those reading here and cannot solve their problems.

Remember : to avoid the validation of a particular field, you only have to remove the class name (validate[...])
If you remove the 'validate' property, you will avoid validation both sides (JS + PHP) No validation at all.
Coding is now a piece of cake

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

Re: In Version 1.5 - jqv:custom rule not found image 18 Oct 2012 09:52 #4643

  • smarano
  • smarano's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
  • Posts: 33
  • Thank you received: 1
You are absolutely right. if I can fix it I'll tell you, thanks again.

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

Re: In Version 1.5 - jqv:custom rule not found image 19 Oct 2012 05:03 #4649

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 986
@smarano :

Do you still have this issue when you generate ?
Can I close this topic ?

If you still have it, can you tell me wich Projet / Table ?
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.099 seconds

Freakin' Awesome!!! J-Cook is simply awesome - whether you're a highly experienced developer or complete novice whether you're building a small inventory component or a complete community solution! The beauty comes from a fast slick and reliable platform that readily provides developers with everything they'll need to build the backbone of a solid and secure component with wizards for authoring access publishing aliasing created/modified by dates... you name it COOK provides it! J-Cook really surpasses all of the 'competition' as far as MVC tools are concerned! Try love it and get cooking!
learnthrusong (JED)
          

Get Started