Auto naming starting with numeric

Is it possible to use numeric data for the autonaming? The field itself is of Data type. But the entry is numbers.
What I want to accomplish is (in custom doctype):

format:{code_number}-{the_item_title}

returns only the {the_item_title}