Skip to content

Commit

Permalink
chore: remove redundant as props from early alphas (#3975)
Browse files Browse the repository at this point in the history
  • Loading branch information
logaretm committed Oct 23, 2022
1 parent ab1330b commit 99cf2f5
Show file tree
Hide file tree
Showing 4 changed files with 143 additions and 143 deletions.
16 changes: 8 additions & 8 deletions packages/vee-validate/tests/ErrorMessage.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ describe('<ErrorMessage />', () => {
},
template: `
<VForm>
<Field name="field" rules="required" as="input" />
<Field name="field" rules="required" />
<ErrorMessage name="field" id="error" />
</VForm>
`,
Expand All @@ -35,7 +35,7 @@ describe('<ErrorMessage />', () => {
},
template: `
<VForm>
<Field name="field" rules="required" as="input" />
<Field name="field" rules="required" />
<ErrorMessage name="field" id="error" />
</VForm>
`,
Expand Down Expand Up @@ -63,8 +63,8 @@ describe('<ErrorMessage />', () => {
ErrorMessage,
},
template: `
<VForm as="form">
<Field name="field" rules="required" as="input" />
<VForm>
<Field name="field" rules="required" />
<ErrorMessage as="div" name="field" id="error" />
<button>Validate</button>
Expand All @@ -86,8 +86,8 @@ describe('<ErrorMessage />', () => {
ErrorMessage,
},
template: `
<VForm as="form">
<Field name="field" rules="required" as="input" />
<VForm>
<Field name="field" rules="required" />
<ErrorMessage as="div" name="field" id="error" v-slot="{ message }">
<span>icon</span>
<span>{{ message }}</span>
Expand All @@ -111,8 +111,8 @@ describe('<ErrorMessage />', () => {
ErrorMessage,
},
template: `
<VForm as="form">
<Field name="field" rules="required" as="input" />
<VForm>
<Field name="field" rules="required" />
<ErrorMessage name="field" v-slot="{ message }">
<p id="error">{{ message }}</p>
</ErrorMessage>
Expand Down
12 changes: 6 additions & 6 deletions packages/vee-validate/tests/Field.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ describe('<Field />', () => {
test('renders an input by default', () => {
const wrapper = mountWithHoc({
template: `
<Field name="field" as="input" />
<Field name="field" />
`,
});

Expand Down Expand Up @@ -112,7 +112,7 @@ describe('<Field />', () => {
};
},
template: `
<VForm as="form">
<VForm>
<Field name="field" :rules="rules" v-slot="{ errors, field }">
<input v-bind="field" type="text">
<span id="fieldError">{{ errors[0] }}</span>
Expand Down Expand Up @@ -166,7 +166,7 @@ describe('<Field />', () => {
test('listens for change events', async () => {
const wrapper = mountWithHoc({
template: `
<VForm as="form" v-slot="{ errors }">
<VForm v-slot="{ errors }">
<Field name="select" as="select" rules="required">
<option value="">0</option>
<option value="1">1</option>
Expand Down Expand Up @@ -287,8 +287,8 @@ describe('<Field />', () => {
test('validates target fields using targeted params', async () => {
const wrapper = mountWithHoc({
template: `
<VForm as="form">
<Field rules="required" name="confirmation" as="input" />
<VForm>
<Field rules="required" name="confirmation" />
<Field name="password" rules="required|confirmed:@confirmation" v-slot="{ field, errors }">
<input type="password" v-bind="field">
Expand Down Expand Up @@ -846,7 +846,7 @@ describe('<Field />', () => {
},
template: `
<VForm @submit="onSubmit">
<Field name="terms" as="input" type="checkbox" :unchecked-value="false" :value="true" /> Coffee
<Field name="terms" type="checkbox" :unchecked-value="false" :value="true" /> Coffee
<button type="submit">Submit</button>
</VForm>
Expand Down
Loading

0 comments on commit 99cf2f5

Please sign in to comment.