hubject / oicp

Open intercharge Protocol
Creative Commons Attribution Share Alike 4.0 International
71 stars 68 forks source link

Checkdigit in ISO-format EvcoID is optional. #101

Open remcotjeerdsma opened 2 years ago

remcotjeerdsma commented 2 years ago

https://github.com/hubject/oicp/blob/master/OICP-2.3/OICP%202.3%20EMP/03_EMP_Data_Types.asciidoc#31-evcoidtype

Current regex: ([A-Za-z]{2}-?[A-Za-z0-9]{3}-?C[A-Za-z0-9]{8}-?[\d|A-Za-z]) Proper regex: ([A-Za-z]{2}-?[A-Za-z0-9]{3}-?C[A-Za-z0-9]{8}-?[\d|A-Za-z]?)

The regex in this section is incorrect, as it does not allow omittance of the optional check digit in an ISO-formatted EvcoID.

Official emi3 standard: https://emi3group.com/wp-content/uploads/sites/5/2018/12/eMI3-standard-v1.0-Part-2.pdf (image)