You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

32 lines
607 B

  1. <template>
  2. <v-text-field
  3. v-bind="$attrs"
  4. :value="value"
  5. :rules="descriptionRules"
  6. :label="$t('generic.description')"
  7. required
  8. @input="$emit('input', $event)"
  9. />
  10. </template>
  11. <script lang="ts">
  12. import Vue from 'vue'
  13. import { validateMinLength } from '~/domain/models/project/project'
  14. export default Vue.extend({
  15. props: {
  16. value: {
  17. type: String,
  18. default: '',
  19. required: true
  20. }
  21. },
  22. data() {
  23. return {
  24. descriptionRules: [
  25. (text: string) => validateMinLength(text) || this.$t('rules.description.required')
  26. ]
  27. }
  28. }
  29. })
  30. </script>