jTaylo99 / kolumnextractor

A data extractor designed around building your requirements and easily extracting and verifying your data.
4 stars 8 forks source link

Raw data values should be changed to primitives for the validators. #17

Open jTaylo99 opened 1 year ago

jTaylo99 commented 1 year ago

As found in PR #15, an issue with reading the data currently is that the raw data values are still strings. Instead we should validate if they can be converted into the type the validator requires, and if it can be then proceed with conversion then validation.

jTaylo99 commented 1 year ago

The best example is for ints and floats in the raw data to be converted in the Number validate method.

jTaylo99 commented 1 year ago

Transforming types in the validator may be unwanted too, so we could add an optional 'strict' argument which wouldn't allow the data to be transformed.