No Code Attached Yet bug
avatar balvard
balvard
29 Feb 2024

Steps to reproduce the issue

In XML file we have a tag called "validationtext".
This element is not useful because it is not translatable.

Expected result

data-validation-text="Please fill Title"

Actual result

data-validation-text="TITLE_FILL_ELEMENT"

System information (as much as possible)

In the .ini file :
TITLE_FILL_ELEMENT="Please fill Title"

Additional comments

Please fix this file : layouts\joomla\form\field\text.php
At line : 98
!empty($validationtext) ? 'data-validation-text="' . $validationtext . '"' : '',
Change this line to this :
!empty($validationtext) ? 'data-validation-text="' . Text::_($validationtext) . '"' : '',
Thanks.

Votes

# of Users Experiencing Issue
1/1
Average Importance Score
5.00

avatar balvard balvard - open - 29 Feb 2024
avatar balvard balvard - change - 29 Feb 2024
Labels Removed: ?
avatar joomla-cms-bot joomla-cms-bot - change - 29 Feb 2024
Labels Added: No Code Attached Yet
avatar joomla-cms-bot joomla-cms-bot - labeled - 29 Feb 2024
avatar Quy
Quy - comment - 2 Mar 2024

@dgrammatiko Hopefully you can provide additional information on this attribute. Thanks.
f0ba73a#diff-7195eb75172e6bd0b450db0f22c89a8a24d8e65afd2d06df17d83e7c278d4d0bR74

avatar dgrammatiko
dgrammatiko - comment - 2 Mar 2024

The data-validation-text is used in the validation script (client side) in order devs to have the option to set a custom invalid state message PER FIELD:

const message = element.getAttribute('data-validation-text');

FWIW the platform itself with the newest native formvalidation supports a similar thing (although the attributes reflect the invalid state)

avatar Hackwar Hackwar - change - 26 Mar 2024
Labels Added: bug
avatar Hackwar Hackwar - labeled - 26 Mar 2024
avatar Hackwar Hackwar - change - 2 Apr 2024
Status New Closed
Closed_Date 0000-00-00 00:00:00 2024-04-02 19:22:07
Closed_By Hackwar
avatar Hackwar Hackwar - close - 2 Apr 2024
avatar Hackwar
Hackwar - comment - 2 Apr 2024

I created #43198 to fix this. Closing this issue. Thanks for your report.

Add a Comment

Login with GitHub to post a comment