(cls, phone_number)
Validates that the given phone number consists of all digits.

        return  void
        raises  InvalidFormatException if the phone number format is invalid
Validates that the given phone number consists of all digits.
Validates that the given phone number consists of all digits .
def validate_number_format(cls, phone_number):
        """
        Validates that the given phone number consists of all digits.

        return  void
        raises  InvalidFormatException if the phone number format is invalid
        """
        if (not phone_number) or (not phone_number_re.match(phone_number)):
            raise InvalidFormatException("Phone number format must consist of only digits.")
def validate_number_format ( cls , phone_number ) : if ( not phone_number ) or ( not phone_number_re . match ( phone_number ) ) : raise InvalidFormatException ( "Phone number format must consist of only digits." )