Make sure that text in AI Translate is smaller then allowed size
>>> [!note] Migrated issue
<!-- Drupal.org comment -->
<!-- Migrated from issue #3479027. -->
Reported by: [marcus_johansson](https://www.drupal.org/user/385947)
Related to !143
>>>
<h3 id="summary-problem-motivation">Problem/Motivation</h3>
<p>Currently you might get a mistranslation with an explanation for a short string- or a text field that might have a limit of 255 characters (or some other set value).</p>
<p>When it tries to save this it will catch a database error because the response is not truncated.</p>
<h4 id="summary-steps-reproduce">Steps to reproduce</h4>
<h3 id="summary-proposed-resolution">Proposed resolution</h3>
<p>Either:<br>
* Add a validation error or retry here<br>
* (or) Substr Drupal class to cut off the message before saving</p>
<h3 id="summary-remaining-tasks">Remaining tasks</h3>
<h3 id="summary-ui-changes">User interface changes</h3>
<h3 id="summary-api-changes">API changes</h3>
<h3 id="summary-data-model-changes">Data model changes</h3>
issue