使用 ant design 提供的 getFieldDecorator 進行驗證
一般開始使用默認選中
<FormItem>
{getFieldDecorator('checkProtocol', {
valuePropName: "checked",
initialValue: true,
rules: [{ required: true, message: '請同意,我已經閱讀並接受' }],
})(
<CheckboxGroup defaultValue={'我已經閱讀並接受' } options = {
[{
label: '我已經閱讀並接受' ,
value: '我已經閱讀並接受'
}]
} />
)}
</FormItem>