Could I limit the length of a ListField data in mongoengie without if condition?
I need something like this:
list = db.ListField(IntField(), max_length = 24)
in my document.
Or I have to check the length of my list when it's going to be update and don't update it if the length of my list greater than 24!
There is nothing like this built into the
ListField, but you can make your customListFieldproviding amax_lengthattribute: