Coerce prop form values to schema type before validation to fix "data must be number"
>>> [!note] Migrated issue
<!-- Drupal.org comment -->
<!-- Migrated from issue #3579284. -->
Reported by: [lauriii](https://www.drupal.org/user/1078742)
Related to !726
>>>
<h3 id="overview">Overview</h3>
<p>When editing component's props on the canvas, number enum values from the HTML are hydrated as strings. Validation uses AJV against a JSON Schema that expects <code>integer</code> or <code>number</code>, so uncoerced string values triggers an error.</p>
<p><img src="https://www.drupal.org/files/issues/2026-03-14/CleanShot%202026-03-14%20at%2020.27.52.gif" alt=""></p>
<h3 id="proposed-resolution">Proposed resolution</h3>
<p>Coerce string form values to the schema type <em>before</em> validation.</p>
<h3 id="ui-changes">User interface changes</h3>
<p>None.</p>
issue