AuthValidationErrors.vue 518B

1234567891011121314151617181920
  1. <script setup>
  2. import { computed } from 'vue'
  3. import { usePage } from '@inertiajs/inertia-vue3'
  4. const errors = computed(() => usePage().props.value.errors)
  5. const hasErrors = computed(() => Object.keys(errors.value).length > 0)
  6. </script>
  7. <template>
  8. <CRow class="justify-content-center">
  9. <CCol md="8">
  10. <CAlert v-if="hasErrors" color="danger">
  11. <ul class="mb-0">
  12. <li v-for="(error, key) in errors" :key="key">{{ error }}</li>
  13. </ul>
  14. </CAlert>
  15. </CCol>
  16. </CRow>
  17. </template>