I have an application where a user creates quiz questions. They can choose from various answer types: yes/no boolean, true/false boolean, integer, string, etc.
a) How should I store those answers? In one column of type string? Or is there a better way?
b) How would I handle the validations when a user is answering the questions? Different answer types will require different validations.
Thanks!
I would suggest two columns, both
Strings. Make the firstanswer, and the otheranswer_type.You could then create a custom validation: