It's bothering me that ISBN validation is regex-only (and similar for barcodes) and I've been thinking about how to address this. I'm not sure where the functionality would belong; -data-js at a glance still seems to be a fairly thin ORM wrapper, so this doesn't seem appropriate. Should I add validation functions to -site, even though it would require special-casing on specific identifiers?
monkey[m]
The ORM would be the right place, which allows us to use it for other projects like the WIP importer for example
In src/validators/edition.ts most likely
The issue is that currently the regexp used for validation is stored in the database along with each identifier type, so it will require some modifications
Specifically to the Edition validator
leftmostcatUTC-7
Ahh, I missed/forgot about the validators folder. Yeah, I don't want to do too much to subvert the existing database-based validation, but maybe adding an extra block after validating identifiers which can do ISBN/barcode verifications. Still requires assuming that one of the fields in the identifier type table is stable, but I don't know that there's any getting around that.
What to select on is the question, though. :) Label seems like the column least likely to change, but since it's intended to be human-readable, it feels a little icky. Does it make sense to maybe add a name column to the table which is intended to be stable and not used for display?