FormBinder
Binds raw (typically all-string) input against a FormDefinition: coerces each value to the field's base type per the frozen contract, validates against the field's constraints, and returns a FormSubmission with normalized values for EVERY field (typed where valid, raw-or-null otherwise) and a per-field ValidationResult. It never dispatches.
FormBinder::bind()
public function bind(Milpa\Live\Schema\FormDefinition $definition, array $rawValues): Milpa\Live\Schema\FormSubmissionBinds raw input against a FormDefinition and returns a typed, validated FormSubmission.
Parameters
| Name | Type | Description |
|---|---|---|
| $definition | Milpa\Live\Schema\FormDefinition | |
| $rawValues | array<string, mixed> |