class TypedChoiceField(**kwargs) [source]
Just like a ChoiceField, except TypedChoiceField takes two extra arguments, coerce and empty_value.
Default widget: Select
Empty value: Whatever you’ve given as empty_value. Normalizes to: A value of the type provided by the coerce argument. Validates that the given value exists in the list of choices and can be coerced. Error message keys: required, invalid_choice
Takes extra arguments:
coerce
A function that takes one argument and returns a