diff --git a/src/components/NegotiationForm.vue b/src/components/NegotiationForm.vue index ddae21e3..1eacae3e 100644 --- a/src/components/NegotiationForm.vue +++ b/src/components/NegotiationForm.vue @@ -204,7 +204,10 @@ /> -
+
@@ -269,7 +273,7 @@ v-if="validationColorHighlight.includes(criteria.name)" class="invalidText" > - Please provide a {{ criteria.label }}! + {{ transformMessage(criteria.type) }}
31 && + (charCode < 48 || charCode > 57) && + charCode !== 46 + ) { + evt.preventDefault() + } +} + +function transformMessage (text) { + if (text == "SINGLE_CHOICE" || text == "BOOLEAN") { + return "Please select one of available values" + } else if (text == "MULTIPLE_CHOICE") { + return "Please select at least one of the available values" + } else if (text == "TEXT_LARGE") { + return "Please provide a text" + } else { + return "Please provide a " + text?.toLowerCase() + } +}