2023-09-27 10:37:59 +02:00
|
|
|
<script setup>
|
|
|
|
const props = defineProps({
|
2023-10-04 10:43:59 +02:00
|
|
|
error: {
|
|
|
|
type: String,
|
2023-09-27 10:37:59 +02:00
|
|
|
required: true
|
|
|
|
},
|
|
|
|
field: {
|
|
|
|
type: String,
|
|
|
|
required: true
|
2024-03-08 11:11:36 +01:00
|
|
|
},
|
|
|
|
alertType: {
|
|
|
|
type: String,
|
|
|
|
default: 'is-danger'
|
2023-09-27 10:37:59 +02:00
|
|
|
}
|
|
|
|
})
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<template>
|
|
|
|
<div role="alert">
|
2023-10-04 10:43:59 +02:00
|
|
|
<p :id="'valError' + field[0].toUpperCase() + field.toLowerCase().slice(1)"
|
2024-03-08 11:11:36 +01:00
|
|
|
class="help"
|
|
|
|
:class="alertType"
|
2023-10-04 10:43:59 +02:00
|
|
|
v-html="error" />
|
2023-09-27 10:37:59 +02:00
|
|
|
</div>
|
|
|
|
</template>
|