• 1

Read this first!

We do not monitor these forums. The forum is provided to exchange information and experience with other users ONLY. Forum responses are not guaranteed.

However, please submit a ticket if you have an active subscription and wish to receive support. Our ticketing system is the only way of getting in touch with RSJoomla! and receiving the official RSJoomla! Customer Support.

For more information, the Support Policy is located here.

Thank you!

TOPIC: Custom validation

Custom validation 13 years 8 months ago #14318

hi, i need help creating a validation rule to test multiple fields at one time and not just one field at a time.

My goel is to test and make sure that first_name, last_name and email is all unique!!!

I have seen the validation rule for unique email but it test only one field.

My question would be how do I start a function and pass all three values at the same time when the submit button is pressed

//code//
...
$db =& JFactory::getDBO();
$query = "SELECT * FROM jos_user WHERE first_name = fname AND last_name = lname AND email = uemail";
$db->setQuery($query);
$db->query();
$num_row = $db->getNumRows();

if($num_row <0)
return false;
return true;
//code//
The administrator has disabled public write access.
  • 1

Read this first!

We do not monitor these forums. The forum is provided to exchange information and experience with other users ONLY. Forum responses are not guaranteed.

However, please submit a ticket if you have an active subscription and wish to receive support. Our ticketing system is the only way of getting in touch with RSJoomla! and receiving the official RSJoomla! Customer Support.

For more information, the Support Policy is located here.

Thank you!