import { Button, Form, Mentions, Space } from 'antd'; import React from 'react'; const { getMentions } = Mentions; const App: React.FC = () => { const [form] = Form.useForm(); const onReset = () => { form.resetFields(); }; const onFinish = async () => { try { const values = await form.validateFields(); console.log('Submit:', values); } catch (errInfo) { console.log('Error:', errInfo); } }; const checkMention = async (_: any, value: string) => { const mentions = getMentions(value); if (mentions.length < 2) { throw new Error('More than one must be selected!'); } }; return (