title: validation the max length of ant design InputNumber in react
body: <p>I have an antd <code>InputNumber</code> in <code>Form.Item</code> in a react project.
  My validation for this input is checking the length of input value.</p>
  <p>This is my code:</p>
  <pre><code>render() {
      return (
        &lt;Form.Item
          label=&quot;Value&quot;
          name=&quot;numberValue&quot;
          rules={[
            {
              pattern: /^(?:\d*)$/,
              message: &quot;Value should contain just number&quot;,
            },
            {
              maxLength: 50,
              message: &quot;Value should be less than 50 character&quot;,
            },
          ]}
          validateTrigger=&quot;onBlur&quot;
        &gt;
          &lt;InputNumber
            onChange={(value) =&gt; {
              this.props.setValue(value);
            }}
          /&gt;
        &lt;/Form.Item&gt;
      );
    }
  </code></pre>
  <p>I have two problems:</p>
  <ol>
  <li><p>I want to show the <code>Value should contain just number</code> messages when user enter non numeric character. But this message doesn't show at all.</p>
  </li>
  <li><p>I want to show the <code>Value should be less than 50 character</code> message, when user enter the number/value with more than 10 character. But now, with entering the first character, this message will be shown!</p>
  </li>
  </ol>