Skip to content

Comments

[5.3] Fix type for custom form validators#45650

Merged
LadySolveig merged 2 commits into5.3-devfrom
5.3/bugfix/custom-validator
Jun 25, 2025
Merged

[5.3] Fix type for custom form validators#45650
LadySolveig merged 2 commits into5.3-devfrom
5.3/bugfix/custom-validator

Conversation

@HLeithner
Copy link
Member

Summary of Changes

Use the correct javascript method name.

Testing Instructions

This is not used in Joomla Core.

Simple test:

  1. Open a form like article and save it. Should work.
  2. Open a form like article and remove a required argument and save it. Should fail.

Custom Code:

Add a custom validator in the article override form or any other override like the login module in frontend.

Something like this:

This validator will fail:

            document.formvalidator.customValidators['validatorname'] = {
                exec: function() {
                    return false;
                }
            };

This validator will succeed:

            document.formvalidator.customValidators['validatorname'] = {
                exec: function() {
                    return true;
                }
            };

Link to documentations

Please select:

  • Documentation link for docs.joomla.org:

  • No documentation changes for docs.joomla.org needed

  • Pull Request link for manual.joomla.org:

  • No documentation changes for manual.joomla.org needed

@joomla-cms-bot joomla-cms-bot added NPM Resource Changed This Pull Request can't be tested by Patchtester PR-5.3-dev labels Jun 24, 2025
@Fedik Fedik added the bug label Jun 24, 2025
@Fedik
Copy link
Member

Fedik commented Jun 25, 2025

I have tested this item ✅ successfully on d7e181b


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/45650.

1 similar comment
@QuyTon
Copy link
Contributor

QuyTon commented Jun 25, 2025

I have tested this item ✅ successfully on d7e181b


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/45650.

@QuyTon
Copy link
Contributor

QuyTon commented Jun 25, 2025

RTC


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/45650.

@joomla-cms-bot joomla-cms-bot added the RTC This Pull Request is Ready To Commit label Jun 25, 2025
@LadySolveig LadySolveig merged commit 0289c76 into 5.3-dev Jun 25, 2025
63 checks passed
@joomla-cms-bot joomla-cms-bot removed the RTC This Pull Request is Ready To Commit label Jun 25, 2025
@LadySolveig
Copy link
Contributor

Thanks for the fix and to all the testers!

@LadySolveig LadySolveig added this to the Joomla! 5.3.2 milestone Jun 25, 2025
@rdeutz rdeutz deleted the 5.3/bugfix/custom-validator branch July 29, 2025 12:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug NPM Resource Changed This Pull Request can't be tested by Patchtester

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants