You are here

public static function Messaging_Destination::validate_address in Messaging 7

Same name and namespace in other branches
  1. 6.4 includes/messaging_destination.class.inc \Messaging_Destination::validate_address()

Validate address format

Parameters

$address: Destination address

$type: Optional address type, for static calls

3 calls to Messaging_Destination::validate_address()
Messaging_Destination::build in ./messaging.destination.inc
Build destination object
Messaging_Destination::validate_type in ./messaging.destination.inc
Validate values to create a destination
Messaging_Send_Method::address_validate in ./messaging.method.inc
Validate address
2 methods override Messaging_Destination::validate_address()
Messaging_Mail_Address::validate_address in messaging_mail/messaging_mail.inc
Validate address format
Messaging_User_Destination::validate_address in ./messaging.destination.inc
Check address is valid

File

./messaging.destination.inc, line 233
Drupal Messaging Framework - Default class file

Class

Messaging_Destination
Message destination class

Code

public static function validate_address($address, $type = NULL) {
  if ($type) {
    return self::static_invoke($type, 'validate_address', $address);
  }
  else {
    return !empty($address);
  }
}