<template>
  <span class="help feedback" v-show="show || cerrors.has(name)" :class="cerrors.has(name) ? cfields[name] : {}">
    {{ cerrors.first(name) }} &nbsp;
  </span>
</template>
<script>
export default {
  name: 'FieldErrors',
  props: {
    name: {
      type: String,
      required: true,
    },
    cfields: {
      type: Object,
      required: true,
    },
    cerrors: {
      type: Object,
      required: true,
    },
    show: {
      type: Boolean,
      required: false,
      default: false,
    },
  },
}
</script>
