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 ...
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 ...
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 ...
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.
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 ...
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-...
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 ...
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....
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 ...
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="...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
validation × 20joomla-3.x × 6
form × 4
jform × 3
joomla-4.x × 3
javascript × 2
emails × 2
validations × 2
regex × 2
php × 1
joomla-2.5 × 1
joomla-3.4 × 1
custom-component × 1
user × 1
url × 1
joomla-3.6 × 1
form-fields-types × 1
joomla-3.5 × 1
sql × 1
registration × 1
model × 1
joomla-4 × 1
controller × 1
tinymce × 1
translation × 1