public function validContact(string $contact): bool
    {
        return filter_var($contact, FILTER_VALIDATE_EMAIL) !== false ||
               filter_var($contact, FILTER_VALIDATE_URL) !== false;
    }
public function validContact(string $contact): bool
    {
        return filter_var($contact, FILTER_VALIDATE_EMAIL) !== false ||
               filter_var($contact, FILTER_VALIDATE_URL) !== false;
    }
public function validContact ( string $ contact ) : bool { return filter_var ( $ contact , FILTER_VALIDATE_EMAIL ) !== false || filter_var ( $ contact , FILTER_VALIDATE_URL ) !== false ; }
Validates a contact.

@param string $contact

@string string $contact
@return bool
Validates a contact .