Hi Vanasco,
This is a generic FormEncode question so you should ask on the FormEncode list. I copied that list on this email. The FormEncode list is pretty low volume, but the maintainers do respond ;).
You might want to include what you want as your final state (for instance I assume you want ints rather than unicode values).
You could then use a Pipe validator:
from formencode import Pipe
from formencode.validators import OneOf, Int
account_type_ids= (1,2,3,4,5)
#must be one of the items in account_type_ids
validator = Pipe(Int(),OneOf(account_
type_ids)
#must be int between 1 and 5
validator = Int(min=1, max=5)
Note that if account_type_ids is not *actually* a list or tuple there may be other options including DictConverter.
Some useful doc links:
-Chris