Fixed #12030 -- Validate integer field range at the model level.

Locally tested against (Py2, Py3) X (SQLite3, PostgreSQL, MySQL) (only missing Oracle).

It's missing a release note since we might want to backport this bugfix to the 1.7.x branch?