Skip to main content
3 votes
Accepted

How to validate Joomla translation ini-files?

I suppose if you are seeking line-by-line .ini file validation with actionable diagnostic detail, then I would avoid trying to re-invent the parser's intricacies/quirks via a regex approach. Split ...
mickmackusa's user avatar
  • 4,846
3 votes
Accepted

Client side validation - custom event handler not called when user enters the field and leaves it being empty

I deleted my earlier answer, since it was on some points true but not exactly answered the question. My mind was blurred by the question. :) The question is very tricky. Why? Because in the question ...
Zollie's user avatar
  • 2,956
2 votes
Accepted

Cannot extend my custom component's validation rules -- does not validate

Just do addrulepath="components/com_mycomponent/models/rules" and leave out the /myrule.php. I presume you're terminating the <field .../> ok in the XML and adding <?php at the start of ...
Robbie Jackson's user avatar
2 votes
Accepted

J4. Custom frontend server side form validation

Thanks! Moreover I have also forgotten use Joomla\CMS\Form\Form; and use Joomla\Registry\Registry; in EspaciocheckRule.php. Now it's working fine.
Peli's user avatar
  • 103
2 votes
Accepted

How to set Form Field Client-Side Validation Error Message?

For static text use data-validation-text attribute: <input name="test" class="form-validate validate-test" data-validation-text="Value is invalid"> In case you're ...
Sharky's user avatar
  • 12k
1 vote

How to validate Joomla translation ini-files?

<?php if (!isset($argv[1])) { return; } $res = parse_ini_file($argv[1]); if ($res === false) { return 1; } $content = file_get_contents($argv[1]); $matches = []; preg_match_all('/^[A-Z_0-...
Olle Härstedt's user avatar
1 vote
Accepted

Joomla 4.3.X Validate a username on registration to NOT contain an @ symbol (notEmail)

This should be addressed in the registration form, the backend function it calls, and any subsequent login attempts. Registration Form In the registration form, you can add some javascript to ensure ...
Riccardo Zorn's user avatar
1 vote

Conditional client side validation

Being overly complicated! The solution was simple - the code that sets "comment_required" should add or remove the "required" class on the input field! My code now reads as follows....
Dave Torr's user avatar
1 vote

How to use form rules programatically to validate data outside a form

Its possible to use the Joomla\CMS\Form\Rule\EmailRule directly within code. Just instantiate it and then call its test method. The test method requires two arguments, a SimpleXMLElement defining the ...
Dom's user avatar
  • 511
1 vote

Client side validation - custom event handler not called when user enters the field and leaves it being empty

Would you not have joy with adding required as an additional class on the field? On the https://docs.joomla.org/Special:MyLanguage/Client-side_form_validation doc page, <field name="email" type="...
mickmackusa's user avatar
  • 4,846

Only top scored, non community-wiki answers of a minimum length are eligible