xseman / bysquare

Encode & Decode "PAY by square" QR string.
https://xseman.github.io/bysquare/
Apache License 2.0
29 stars 7 forks source link

feat: add data model validation #17

Closed xseman closed 1 month ago

github-actions[bot] commented 10 months ago

This issue is stale because it has been open for 30 days with no activity.

LukasBicus commented 1 month ago
LukasBicus commented 1 month ago

I'm going to implement this.

xseman commented 1 month ago

After a moment of consideration, it makes sense for the first iteration to optionally validate ISO standards that have a strict format. This would be especially useful for applications that consume the generated code and are limited to serialization for ISO standards (banks mobile applications).

To start, we can focus on checking three types of information:

Maybe there are more fields with standards? @LukasBicus, could you take a look and see if I missed any? It seems like validator.js might be a good option for this task, since it supports all the standards I've identified so far.

LukasBicus commented 1 month ago

validator.js will be a great choice. I checked the references section of specification_v1.1.0.pdf. I will be a little more specific - the ISO 3166­1 alpha­3 will be used for country code validation (for example SVK).

I found no more ISO standards in the document.