How to use the react ant design mobile form and how to get the data to report an error

 submit=(e)=>{
        e.preventDefault();
        let value=this.props.form.getFieldValue("key")+this.props.from.getFieldValue("replytext");
        alert(value);
    }
    render() {
        const { getFieldProps } = this.props.form;
        return (
            <div className="createreply-container">
                <WhiteSpace />
                <WhiteSpace />
                <form onSubmit={this.submit}>
             <WingBlank>
                 <List renderHeader={() => ""}>
                     <InputItem
                         {...getFieldProps("key")}
                         placeholder=""
                     />
                 </List>
             </WingBlank>
                <WhiteSpace />
              <WingBlank>
                  <List renderHeader={() => ""}>
                      <TextareaItem
                          {...getFieldProps("replytext", {
                              // initialValue: "...",
                          })}
                          placeholder=""
                          rows={5}
                          count={100}
                      />
                  </List>
              </WingBlank>
                <WhiteSpace />
                <WingBlank>
                    
                </WingBlank>
                <WhiteSpace size="lg"/>
                <WingBlank>
                    <Button type="primary"  onClick={this.submit}></Button>
                    </WingBlank>
                </form>

part of the code

error:

Mar.02,2021

extract the document of three-point ant design:

  1. [2.x] "Form obsolete getFieldProps, Please use getFieldDecorator" to quickly upgrade.
  2. Note: when using getFieldsValue getFieldValue setFieldsValue, etc., make sure that the corresponding field has already been registered with getFieldDecorator.

3.validateFields verifies and gets the values of a set of input fields and Error,. If the fieldNames parameter is empty, verify all components Function ([fieldNames: string []], options: object, callback: Function (errors, values))

).

validateFieldsAndScroll is similar to validateFields, but after verification, if the failed menu field is not in the visible range, it will automatically scroll into the visible range reference validateFields

.
Menu