regulaforensics / react-native-document-reader

React-Native Framework for reading and validation of identification documents
19 stars 10 forks source link

Failed to check license expiry date when license is expired #3

Open HengJunXi opened 3 years ago

HengJunXi commented 3 years ago

Currently, to check the license expiry date, we would need to initialise the Regula.DocumentReader first; however, the initialisation will fail when the license is expired. This disallow us from knowing whether the failure is caused by expired license and show appropriate error message. There is a not so reliable way of checking if the error caught in the errorCallback (a string) .includes("invalid date"). Are there any better alternatives like error codes or something?

vyakimchik commented 3 years ago

Hello,

We'll think of that and try to implement this feature in the next version.