import React from 'react'; import { Button, Form, Mentions } from 'antd'; 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 (