diff --git a/src/components/input/VInput.vue b/src/components/input/VInput.vue index f99d9d1..23992fa 100644 --- a/src/components/input/VInput.vue +++ b/src/components/input/VInput.vue @@ -87,8 +87,8 @@ const labelState = computed(() => { v-bind="attrs" :class="[styles['text-body-MD-standard-text-Regular'], { 'p-password': true, - 'error': props.isInvalid && !props.isValid && !props.disabled, - 'success': !props.isInvalid && props.isValid && !props.disabled, + 'error': props.isInvalid && !props.isValid && !props.disabled || !!props.errorMessage, + 'success': !props.isInvalid && props.isValid && !props.disabled && !props.errorMessage || !!props.validMessage, }]" :disabled="props.disabled" :aria-disabled="props.disabled" @@ -148,8 +148,8 @@ const labelState = computed(() => { v-bind="attrs" :class="[styles['text-body-MD-standard-text-Regular'], { 'p-textarea': true, - 'error': props.isInvalid && !props.isValid && !props.disabled, - 'success': !props.isInvalid && props.isValid && !props.disabled, + 'error': props.isInvalid && !props.isValid && !props.disabled || !!props.errorMessage, + 'success': !props.isInvalid && props.isValid && !props.disabled && !props.errorMessage || !!props.validMessage, }]" :disabled="props.disabled" :aria-disabled="props.disabled" @@ -166,7 +166,7 @@ const labelState = computed(() => { :class="[styles['text-body-MD-standard-text-Regular'], { 'p-inputtext': true, 'error': props.isInvalid && !props.isValid && !props.disabled || !!props.errorMessage, - 'success': !props.isInvalid && props.isValid && !props.disabled && !props.errorMessage, + 'success': !props.isInvalid && props.isValid && !props.disabled && !props.errorMessage || !!props.validMessage, }]" :disabled="props.disabled" :aria-disabled="props.disabled"