mirror of
https://github.com/Bubka/2FAuth.git
synced 2025-02-08 14:39:33 +01:00
29 lines
633 B
Vue
29 lines
633 B
Vue
<script setup>
|
|
import { useValidationErrorIdGenerator } from '@/composables/helpers'
|
|
|
|
const props = defineProps({
|
|
error: {
|
|
type: String,
|
|
required: true
|
|
},
|
|
field: {
|
|
type: String,
|
|
required: true
|
|
},
|
|
alertType: {
|
|
type: String,
|
|
default: 'is-danger'
|
|
}
|
|
})
|
|
|
|
const { valErrorId } = useValidationErrorIdGenerator(props.field)
|
|
</script>
|
|
|
|
<template>
|
|
<div role="alert">
|
|
<p :id="valErrorId"
|
|
class="help"
|
|
:class="alertType"
|
|
v-html="error" />
|
|
</div>
|
|
</template> |