<p dir="auto">I know that keeping entities outside bundles is not considered a good practice, but still there are few rare cases when we might face such a situation.</p>
<p dir="auto">It would be nice to have the possibility of manually specifying the path of the entity and the target bundle for the generated CRUD.</p>
<p dir="auto">This should give an idea about the possible solution to this:</p>
<p dir="auto"><a href="http://stackoverflow.com/questions/31689469/doctrinegeneratecrud-for-entites-outside-a-bundle" rel="nofollow">http://stackoverflow.com/questions/31689469/doctrinegeneratecrud-for-entites-outside-a-bundle</a></p>
<p dir="auto">We do have the form types <code class="notranslate">text</code> and <code class="notranslate">textarea</code> and in Doctrine the field types <code class="notranslate">text</code> and <code class="notranslate">string</code>.</p>
<p dir="auto">If you use a string/text you usually expect some data but not special characters like a line feed.<br>
This is no problem if you use the form component since you cannot enter a line feed in the input field.<br>
If you however develop an API then you might get such unwanted characters in e.g. the name or<br>
the street.</p>
<p dir="auto">Should we add a validation constraint Text? It could have some defaults to disallow some special characters and options to customize that behavior?</p>
<p dir="auto">With this we can support the developer to have a more consistent database without the hassle of adding an Regex validator.</p>
<p dir="auto">I think at least double spaces and line breaks should be invalidated. I was using for this <code class="notranslate">/(\s\s)|(\n)/</code> so far.</p>
<p dir="auto">What do you think - Does this make sense? What should be invalidated?</p>