Move data validation code to storage pkg