Fixed #13711 -- Model check added to ensure that auto-generated field name is within limits of the database.

...ion.
a separate model
(and same note as above about spaces at end of string)