• New Commercial Services Section

    We have now opened a commercial services section here on the forum. If you have a Fabrik project that you wish to have someone work on for you, post it under Help Wanted. If you are an application developer and wish to earn some money helping others, post your details under Fabrik Application Developers.

    Both of these are unmoderated. It will be up to both parties to work out the details and come to an agreement.

Validations issues

Bauer

Well-Known Member
I have list that has a joined table with no repeats.
When I edit the form, the configuration settings in the validation (at least for a 'field' or textarea' element ) are being ignored.
  • If 'On' is set to 'New', the validation is run even if it is an edit (not 'New').
  • The 'Condition' is being ignored. E.g. If I put 'return false;' as the condition, the validation is still run.
I've tested this issue with multiple fields and always get the same results.
 
Take a look in components/com_fabrik/models/validation_rule.php and shouldValidate / shouldValidateOn - code looks OK to me.
 
It's doing this for every validation plugin I tested - in any form.

What seems to be going on here is that the validate routine is being triggered even when the configuration says it shouldn't. By that I mean the Ajax spinner is shown in the element, along with the word 'Validating'.

And whatever javascript is running per that spinner, it is taking up unnecessary time and sometimes interfering with other javascript (in the form_xx.js file).

It looks like, if 'Ajax validation' is set to 'Yes' in the form configuration, then the validation gets run regardless any settings.

In the end, the spinner goes away and the element border is always green (as if it passed validation) - but if you put in a value that shouldn't pass validation the border still comes up green. So technically, I suppose someone might argue , the settings are working - in that the validation is never really completed. :p

All joking aside. This need s fixin'.
I gave up when I saw that there are 2 validation rule classes. - one is validation_rule.php in components/com_fabrik/models - and the other is Validationrule.php in
libraries/fabrik/fabrik/plugins/Validationrule

Both extends FabrikPlugin.
So which one gets used when - and why are there 2 classes that seem to do the same thing and seem to include the same functions?
 
Last edited:
No - technically this is what I would call "broken". But you have the skills to diagnose and fix.

I have putting in PR after PR to fix stuff, Hugh is working his socks off on F4 and is too busy even to review my fixes. But my hands are full and neither of us have time to look at it, so I guess it's up to you.
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top