Merge branch 'develop' into feature/humphries/INSR-7768
This commit is contained in:
commit
144f04ce38
2 changed files with 11 additions and 4 deletions
|
|
@ -1,7 +1,10 @@
|
||||||
<template>
|
<template>
|
||||||
<div
|
<div
|
||||||
class="textarea-question"
|
class="textarea-question"
|
||||||
:class="(errors && errors.length) ? 'has-error' : ''">
|
:class="[
|
||||||
|
(errors && errors.length) ? 'has-error' : '',
|
||||||
|
(meta?.valid && meta?.touched && !(errors && errors.length)) ? 'has-success' : ''
|
||||||
|
]">
|
||||||
<label
|
<label
|
||||||
:for="inputId"
|
:for="inputId"
|
||||||
class="form-label">
|
class="form-label">
|
||||||
|
|
@ -84,7 +87,7 @@ export default {
|
||||||
initialValue
|
initialValue
|
||||||
};
|
};
|
||||||
|
|
||||||
const { errorMessage, handleChange, handleBlur, validate, errors, resetField } =
|
const { errorMessage, handleChange, handleBlur, validate, errors, resetField, meta } =
|
||||||
useField(props.inputId, props.validationRules, fieldOptions);
|
useField(props.inputId, props.validationRules, fieldOptions);
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
|
@ -93,7 +96,8 @@ export default {
|
||||||
handleBlur,
|
handleBlur,
|
||||||
validate,
|
validate,
|
||||||
errors,
|
errors,
|
||||||
resetField
|
resetField,
|
||||||
|
meta
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,10 @@
|
||||||
<template>
|
<template>
|
||||||
<div
|
<div
|
||||||
class="textbox-question"
|
class="textbox-question"
|
||||||
:class="(errors && errors.length) || hasError ? 'has-error' : ''">
|
:class="[
|
||||||
|
((errors && errors.length) || hasError) ? 'has-error' : '',
|
||||||
|
(meta?.valid && meta?.touched && !((errors && errors.length) || hasError)) ? 'has-success' : ''
|
||||||
|
]">
|
||||||
<label
|
<label
|
||||||
v-if="displayQuestionText"
|
v-if="displayQuestionText"
|
||||||
:for="inputId"
|
:for="inputId"
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue