import React from "react"; import styles from "./index.less"; import { Mentions, Form, Button } from "antd"; const { Option, getMentions } = Mentions; const App = () => { 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 (rule, value, callback) => { const mentions = getMentions(value); if (mentions.length < 2) { throw new Error("More than one must be selected!"); } }; return (