4
« on: February 01, 2010, 10:43:58 am »
Problem solved:
Fengoffice file / application / models / contacts / Contact.class.php
function validate(&$errors) {
// Validate username if present
// if(!$this->validatePresenceOf('lastname') && !$this->validatePresenceOf('firstname')) {
// $errors[] = lang('contact identifier required');
// }
// if (!$this->validateUniquenessOf('firstname','lastname' )) { // if
// $errors[] = lang('name must be unique');
// }
//if email address is entered, it must be unique
if($this->validatePresenceOf('email')) {
$this->setEmail(trim($this->getEmail()));
if(!$this->validateFormatOf('email', EMAIL_FORMAT)) $errors[] = lang('invalid email address');
if(!$this->validateUniquenessOf('email')) $errors[] = lang('email address must be unique');
}
} // validate