PHACDataHub / cpho-phase2

A data collection and retrieval application to automate and standardize the data intake for the yearly Health of Canadians report
5 stars 3 forks source link

fix: revamped validation for upload #328

Closed msarar closed 6 months ago

msarar commented 6 months ago

Added check for closed periods. Also, Added a class "IndDataCleanMixin" that helps with validation for indicator datum. Methods in this class expects input for field and returns validation errors if appropriate.

Reason for making this a class of its own: So that both IndicatorDatumForm and Upload can use the same class to centralize validation logic.

Also reformatted some of the upload code to make it more readable