public function isValid($value) { $customer = Customers::getCustomerbyEmail($value); if (isset($customer[0])) { $this->_error(self::ALREADYUSED); return false; } else { return true; } }