Hot answers tagged

3

If there is no native answer I have a solution to do this with an own JFormRule class. Create a file in your component/models/form/rules directory called regex.php Insert the source below class componentnameFormRuleRegex extends JFormRule { public function test(&$element, $value, $group = null, &$input = null, &$form = null) { $...


3

You can use Client Side Validation for this, however You will need to make a Custom Form Field for this to happen. Assuming you're using Joomla 3.4, you first need to initialise the validation script, like so: JHtml::_('behavior.formvalidator'); Then for your field, you need to add the class validate-changeme <field name="firstname" type="text" label="...


1

First of all, do you actually need a where clause? Are you really trying to exclude any names? What are the actual exclusions you want? If you don't mean to filter any names, then you can simply remove the WHERE clause in your query and have all the users/usernames. Secondly, you can't pass such regular expressions in LIKE. I bet your above query isn't ...


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