﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
35325	CharField max_length ignored	Aristotelis Mikropoulos	nobody	"In a vanilla project and app (all default settings, nothing changed), trying to create a model record with a CharField longer than what is defined, works (no exception raised, no truncation):

{{{
# models.py
from django.db import models

class Foo(models.Model):
    name = models.CharField(max_length=5)
}}}

{{{
$ python manage.py shell
>>> from foo.models import Foo
>>> Foo.objects.create(name='abcdefghijk')
<Foo: Foo object (1)>
>>> f = Foo.objects.first()
>>> f
<Foo: Foo object (1)>
>>> f.name
'abcdefghijk'
}}}

Maybe I am missing something, or maybe that's just sqlite behavior, but shouldn't some exception be raised?

Ubuntu 22.04
Python 3.10.12
Django 5.0.3
DB engine django.db.backends.sqlite3 (default)"	Bug	closed	Database layer (models, ORM)	5.0	Normal	duplicate			Unreviewed	0	0	0	0	0	0
