We do not specify the maxLength at the REST API specs level, even if the DB has one defined. Both must match.
Bug 40176 - Add maxLength to the item definition Bug 40177 - Add maxLength to the library definition Bug 40178 - Add maxLength to the patron definition Bug 40179 - Add maxLength to the patron's category definition
to expand a little on comment from child bug about usability: (https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40176#c10) > on Kohas with MANY wrong barcodes this change (very strict) > prevented it from loading a number of bibilios and that stopped > whole Koha department from work for a while: required everyone > to fix the barcodes in one day otherwise it blocks the usage. ... might also be applicable to other parameters, so if there will be some strict changes and that make Koha broken because of not accurate data, our users get stuck even not knowing why koha started to crash or at least urgently spending all time fixing bad data, might be massive job, at least people should be warned before upgrade much more in advance, or we should do gradual updates first with warnings (yet that hard to do if we just rely on length check in API and return API error on mismatch). (thinking aloud)