https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27945
--- Comment #91 from Tomás Cohen Arazi <tomasco...@gmail.com> --- (In reply to Marcel de Rooy from comment #88) > (In reply to Jonathan Druart from comment #86) > > I think so, it does not make sense to have it there. It may be better to > > just remove this check as we have the JS validation. > > > > If it is really what you need, you must use a "int unsigned" at DB level. > > Agustin added the test with \d+ before there was js validation. I agree to > remove it now. Not sure if we should really specify unsigned in SQL; did we > do that more often? We could just check !value < 0 in js as well. The DB structure and data types should help us avoid useless manual validations. But as we don't use STRICT_TRANS_TABLES, even marking the column as UNSIGNED INT will allow setting even a string... This is one of the reasons we should push for the API instead of this controller scripts (for data entry at least), because we can add the rules to the spec, and the OpenAPI plugin validates all the things for us. That said, I believe we can either keep or remove the validation. Keeping it prevents passing bad data manually, removing it cleans the controller a tiny bit. I would say let's do whatever the RM is more comfortable with so we move on. -- You are receiving this mail because: You are watching all bug changes. _______________________________________________ Koha-bugs mailing list Koha-bugs@lists.koha-community.org https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/