Fix error messages for validation
This commit is contained in:
parent
1055b8c933
commit
ac5833a6ec
|
|
@ -18,7 +18,6 @@
|
||||||
name="coupon"
|
name="coupon"
|
||||||
class="login-form__field"
|
class="login-form__field"
|
||||||
label="Coupon-Code"
|
label="Coupon-Code"
|
||||||
v-model="coupon"
|
|
||||||
v-slot="{field}"
|
v-slot="{field}"
|
||||||
>
|
>
|
||||||
<input-wrapper
|
<input-wrapper
|
||||||
|
|
@ -35,6 +34,7 @@
|
||||||
>
|
>
|
||||||
<ErrorMessage
|
<ErrorMessage
|
||||||
name="coupon"
|
name="coupon"
|
||||||
|
data-cy="coupon-local-errors"
|
||||||
class="skillboxform-input__error"
|
class="skillboxform-input__error"
|
||||||
/>
|
/>
|
||||||
</input-wrapper>
|
</input-wrapper>
|
||||||
|
|
@ -54,6 +54,14 @@
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
</v-form>
|
</v-form>
|
||||||
|
<div v-if="couponErrors.length">
|
||||||
|
<small
|
||||||
|
data-cy="coupon-remote-errors"
|
||||||
|
class="skillboxform-input__error"
|
||||||
|
v-for="error in couponErrors"
|
||||||
|
:key="error"
|
||||||
|
>{{ error }}</small>
|
||||||
|
</div>
|
||||||
</section>
|
</section>
|
||||||
<section class="get-license">
|
<section class="get-license">
|
||||||
<h2>Oder, kaufen Sie eine Lizenz</h2>
|
<h2>Oder, kaufen Sie eine Lizenz</h2>
|
||||||
|
|
@ -76,6 +84,7 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import {defineComponent} from 'vue';
|
||||||
import REDEEM_COUPON from '@/graphql/gql/mutations/redeemCoupon.gql';
|
import REDEEM_COUPON from '@/graphql/gql/mutations/redeemCoupon.gql';
|
||||||
import ME_QUERY from '@/graphql/gql/queries/meQuery.gql';
|
import ME_QUERY from '@/graphql/gql/queries/meQuery.gql';
|
||||||
import LoadingButton from '@/components/LoadingButton';
|
import LoadingButton from '@/components/LoadingButton';
|
||||||
|
|
@ -83,14 +92,15 @@
|
||||||
import me from '@/mixins/me';
|
import me from '@/mixins/me';
|
||||||
import logout from '@/mixins/logout';
|
import logout from '@/mixins/logout';
|
||||||
|
|
||||||
import {Form, Field} from 'vee-validate';
|
import {Form, Field, ErrorMessage} from 'vee-validate';
|
||||||
import InputWrapper from '@/components/validation/InputWrapper';
|
import InputWrapper from '@/components/validation/InputWrapper';
|
||||||
|
|
||||||
export default {
|
export default defineComponent({
|
||||||
mixins: [me, logout],
|
mixins: [me, logout],
|
||||||
components: {
|
components: {
|
||||||
InputWrapper,
|
InputWrapper,
|
||||||
LoadingButton,
|
LoadingButton,
|
||||||
|
ErrorMessage,
|
||||||
'v-form': Form,
|
'v-form': Form,
|
||||||
Field
|
Field
|
||||||
},
|
},
|
||||||
|
|
@ -153,7 +163,7 @@
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
};
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue