Fügen Sie Regexp zu AntD hinzu

{getFieldDecorator("testNumber", {
        rules: [
          {
            required: true,
            type: "regexp",
            pattern: new RegExp(/\d+/g),
            message: "Wrong format!"
          }
        ]
      })(<Input />)}
Mohamed Iheb Hichri