paleobot / pbot-dev

Codebase and initial design documents for pbot client
MIT License
2 stars 2 forks source link

Apparently, ORCIDs can have an X in the last digit #188

Closed NoisyFlowers closed 8 months ago

NoisyFlowers commented 1 year ago

I dunno wtf

aazaff commented 10 months ago

Maybe just switch to a charlength check? They should always be the same length?

NoisyFlowers commented 8 months ago

The last digit in an orcid is a checksum of the other digits that can take on a value of 0..10. 10 is represented by X.

I changed the validation regex to allow X. I also added verification of the checksum.

This is in paleobot/pbot-client@9d118a0b8dfe1a235e750f41a4145c480d7614fd paleobot/pbot-client@a0cc04d8043d6fbefdc2c359cba47e2a83734422

NoisyFlowers commented 8 months ago

Merged to master and deployed to dev and stage