Skip to content

表单嵌套表格, error提示没有触发 #3614

@xoptimal

Description

@xoptimal
  • I have searched the issues of this repository and believe that this is not a duplicate.

Version

2.0.0-rc.9

Environment

last

Reproduction link

--

Steps to reproduce

<template>
  <!-- hidden PageHeaderWrapper title demo -->
  <page-header-wrapper :title="false" :content="$t('form.basic-form.basic.description')">
    <a-card :body-style="{padding: '24px 32px'}" :bordered="false">
      <a-form :form="form" @submit="handleSubmit">
      <a-table bordered :data-source="dataSource" :columns="columns">
        <template slot="name" slot-scope="text, record, index">
            <a-form-item>
              <a-input
                v-decorator="[`name-${index}`,
                {
                  validateTrigger: ['change', 'blur'],
                  rules: [
                    {
                      required: true,
                      whitespace: true,
                      message: 'name.',
                    },
                  ],
                },
              ]"
                placeholder="passenger name"
                style="width: 60%; margin-right: 8px"
              />
          </a-form-item>
        </template>
        <template slot="age" slot-scope="text, record, index">
          <a-form-item>
            <a-input
              v-decorator="[`age-${index}`,
                {
                  validateTrigger: ['change', 'blur'],
                  rules: [
                    {
                      required: true,
                      whitespace: true,
                      message: 'age.',
                    },
                  ],
                },
              ]"
              placeholder="passenger name"
              style="width: 60%; margin-right: 8px"
            />
          </a-form-item>
        </template>
        <template slot="address" slot-scope="text, record, index">
          <a-form-item>
            <a-input
              v-decorator="[`address-${index}`,
                {
                  validateTrigger: ['change', 'blur'],
                  rules: [
                    {
                      required: true,
                      whitespace: true,
                      message: 'address.',
                    },
                  ],
                },
              ]"
              placeholder="passenger name"
              style="width: 60%; margin-right: 8px"
            />
          </a-form-item>
        </template>

      </a-table>
        <a-form-item >
          <a-button type="primary" html-type="submit">
            Submit
          </a-button>
        </a-form-item>
      </a-form>

    </a-card>
  </page-header-wrapper>
</template>

What is expected?

如题

What is actually happening?

如题

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions