title: How to add custom Validation in antd form in react?
body: <p>I am not able to figure out how to add custom validation in <strong>antd</strong> form in react. Validator function will work or not. Please suggest a suitable approach.</p>
  <pre><code>&lt;Form.Item
    label=&quot;Name&quot;
    name=&quot;name&quot;
    rules={[
      {
        required: true,
        message: 'The name is required.',
      },
      {
        pattern: /^[a-zA-Z0-9]+$/,
        message: 'Name can only include letters and numbers.',
      },
    ]}
  &gt;
    &lt;Input /&gt;
  &lt;/Form.Item&gt;
  </code></pre>