Back to Reflex

6301.Feature

packages/reflex-components-core/news/6301.feature.md

0.9.5642 B
Original Source

Form now validates statically-knowable fields against a TypedDict-annotated on_submit handler at create time: it walks nested form controls (including components nested in props), collects their static name/id values, and raises EventHandlerValueError listing the missing and present fields when a required TypedDict field has no matching control. input, select, and textarea are marked as form controls so their identifiers are collected, and required-field resolution honors NotRequired across Python 3.10 and 3.11+. The on_submit handler signature also accepts a mapping-style payload via on_submit_mapping_event.