• Hello Fabrik Community

    Fabrik is now in the hands of the development team that brought you Fabrik for Joomla 4. We have recently transitioned the Fabrik site over to a new server and are busy trying to clean it up. We have upgraded the site to Joomla 4 and are running the latest version of Fabrik 4. We have also upgraded the Xenforo forum software to the latest version. Many of the widgets you might have been used to on the forum are no longer operational, many abandoned by the developers. We hope to bring back some of the important ones as we have time.

    Exciting times to be sure.

    The Fabrik 4.0 Official release is now available. In addition, the Fabrik codebase is now available in a public repository. See the notices about these in the announcements section

    We wish to shout out a very big Thank You to all of you who have made donations. They have really helped. But we can always use more...wink..wink..

    Also a big Thank You to those of you who have been assisting others in the forum. This takes a very big burden off of us as we work on bugs, the website and the future of Fabrik.

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