Closed hminsky2002 closed 6 months ago
@hminsky2002 you mentioned this in a zulip thread but wanted to bring it here -- I don't think we should be changing any of the values at this point (e.g. if coercion is resulting in value modification). This would mean we don't want to strip white space, change case, or change the format of the value that is going to be stored.
We should be storing exactly what the user gave us to store, but adding a flag as to whether its format met our expectations. We may add a "cleanup" step in a future date that attempts to correct the value they gave us.
Probable duplicate of #308 (in addition to #760 being a dupe).
Regardless, huzzah, @hminsky2002!
For history's sake: this wasn't a duplicate, but an enhancement of the validation (we wanted to use ajv to do the validation, the initial implementation used regex)
@slifty That makes sense, thanks!
Related to Issue #875 and Issue #760
the ajv-formats package offers type validation for primitive types, such as number, string, and boolean. We should implement this in the proposal field validation and anywhere else we are validating types.