title: getFieldDecorator rules for password reset?
body: <p>I'm trying to do a "field 2 does not match field 1" thing here (i.e. "passwords do not match).</p>
  
  <p>There <a href="https://ant.design/components/form/" rel="noreferrer">isn't much documentation</a> on the available rules for the antd forms. They point at this project <a href="https://github.com/yiminghe/async-validator#rules" rel="noreferrer">here</a>.</p>
  
  <p>Below is my current form:</p>
  
  <pre><code>const ResetPasswordForm = Form.create()(React.createClass({
    getInitialState () {
      return {
        loading: false
      };
    },
    handleSubmit(e) {
      e.preventDefault();
      this.props.form.validateFields((err, values) =&gt; {
        if (err) {
          failure();
        }
        if (!err) {
          let newPassword = values.newPassword;
          let repeatNewPassword = values.repeatNewPassword;
          handleResetPassword(newPassword, repeatNewPassword, this.props.token);
        }
      });
  
    },
    render() {
      const { getFieldDecorator } = this.props.form;
  
      const newPasswordRules = [
        { required: true, message: 'Please input a new password!' }
      ];
  
      const repeatNewPassword = [
        { required: true, message: 'Please repeat the new password!' }
      ];
  
      return (
        &lt;Form onSubmit={this.handleSubmit} className="login-form"&gt;
          &lt;FormItem&gt;
            {getFieldDecorator('newPassword', { rules: newPasswordRules })(
              &lt;Input addonBefore={&lt;Icon type="lock" /&gt;} type="password" placeholder="New password" /&gt;
            )}
          &lt;/FormItem&gt;
          &lt;FormItem&gt;
            {getFieldDecorator('repeatNewPassword', { rules: repeatNewPassword })(
              &lt;Input addonBefore={&lt;Icon type="lock" /&gt;} type="password" placeholder="Repeat new password" /&gt;
            )}
          &lt;/FormItem&gt;
          &lt;FormItem&gt;
            &lt;Button loading={this.state.loading} type="primary" htmlType="submit" className={css(styles.loginButton)}&gt;
              Reset Password
            &lt;/Button&gt;
          &lt;/FormItem&gt;
        &lt;/Form&gt;
      );
    }
  }));
  </code></pre>
  
  <p>If anyone can point me in the right direction for creating a rule that checks that the first field value matches the second, that'd be awesome!</p>