zooniverse / front-end-monorepo

A rebuild of the front-end for zooniverse.org
https://www.zooniverse.org
Apache License 2.0
104 stars 29 forks source link

Add survey task and annotation validations #1987

Open mcbouslog opened 3 years ago

mcbouslog commented 3 years ago

Using types.refinement,

survey task validations:

survey annotation validations:

Iteration on #1935.

goplayoutside3 commented 10 months ago

@mcbouslog Is this still something to be added to the classifier? Is this the correct related file? https://github.com/zooniverse/front-end-monorepo/blob/master/packages/lib-classifier/src/plugins/tasks/survey/models/SurveyTask.js

mcbouslog commented 10 months ago

Yes, additional validations could be added, and that is indeed the correct related file (https://github.com/zooniverse/front-end-monorepo/blob/master/packages/lib-classifier/src/plugins/tasks/survey/models/SurveyTask.js). In that file the characteristics property has been validated, but the other properties noted in this issue's initial comment have not been validated. However, I think there might be many similar situations (unvalidated properties/objects) throughout the code that don't have a related issue.