Braintree\AddressGateway::_validateCustomerId PHP Method

_validateCustomerId() private method

verifies that a valid customer id is being used
private _validateCustomerId ( string $id = null )
$id string customer id
    private function _validateCustomerId($id = null)
    {
        if (empty($id) || trim($id) == "") {
            throw new InvalidArgumentException('expected customer id to be set');
        }
        if (!preg_match('/^[0-9A-Za-z_-]+$/', $id)) {
            throw new InvalidArgumentException($id . ' is an invalid customer id.');
        }
    }