我在React Project上工作,我的目标是创建记录的API,但与此同时我遇到了这个错误SequelizeValidationError : askType cannot be an array or an object
。我将分享我的代码,有人可以帮助我如何将对象值转换为单个字符串。谢谢
代码
let taskChange = function (value) {
slotInfo.taskType = value;
};
<select name="taskType" onChange={taskChange}>
<option value="no">Task Type</option>
<option value="meeting">Meeting</option>
<option value="followUp">Follow Up</option>
<option value="viewing">Viewing</option>
<option value="reminder">Reminder</option>
<option value="other">Other</option>
</select>