Create validator for structured content
>>> [!note] Migrated issue <!-- Drupal.org comment --> <!-- Migrated from issue #3561971. --> Reported by: [marcus_johansson](https://www.drupal.org/user/385947) Related to !1385 !1242 !1210 >>> <p>[Tracker]<br> <strong>Update Summary: </strong>[One-line status update for stakeholders]<br> <strong>Short Description: </strong>Create a validator of structured content<br> <strong>Check-in Date: </strong>MM/DD/YYYY<br> <em>Metadata is used by the <a href="https://www.drupalstarforge.ai/" title="AI Tracker">AI Tracker.</a> Docs and additional fields <a href="https://www.drupalstarforge.ai/ai-dashboard/docs" title="AI Issue Tracker Documentation">here</a>.</em><br> [/Tracker]</p> <h3 id="summary-problem-motivation">Problem/Motivation</h3> <p>Currently we have an input in specific places like ECA, AI Agents or AI API Explorer where you can provide a structured content as a big json or yaml blob in a textarea.</p> <p>Since there are very specific rules about how we can add these, and since its currently based on the way we do it here: <a href="https://project.pages.drupalcode.org/ai/1.2.x/developers/testing_an_ai_provider/#structured-data-chat-test">https://project.pages.drupalcode.org/ai/1.2.x/developers/testing_an_ai_provider/#structured-data-chat-test</a></p> <p>One way of helping with this, is to make sure that there is a validator service or symfony validation for this, that gives back human readable error messages what is not correct.</p> <h3 id="summary-proposed-resolution">Proposed resolution</h3> <ul> <li>Take time to research possible solutions for this - and what makes sense, service, Symfony Constraint etc.</li> <li>Check if there are PHP libraries doing this.</li> <li>Implement it in a provable way.</li> <li>Write tests and documentation</li> </ul>
issue