Seeds typically remain viable for about 3 years if kept in cool, dark, dry conditions though there are exceptions. For example, members of the carrot family (carrots, parsnips and parsley) have short-lived seeds which are usually good for only 1 to 2 years. Colorado State University has a publication with more detailed information about the longevity of specific species. (Storing Vegetable and Flower Seeds)
If you are unsure of your seed viability you can
test it by placing 10 seeds on a paper towel moistened with warm water. Cover the
seeds with a second moistened towel. Roll up the towels and place inside a plastic bag
with several holes. Keep the bag in a warm location such as the top of a refrigerator.
Remoisten the towels with warm water as needed. After the first week, check for
germination. Remove sprouted seeds and check again after another week. The percent
of seeds that sprout indicates the germination rate. You can decide if this rate is acceptable or if purchasing new seed is warranted.