diff --git a/frontend/src/components/forms/AutoCompleteInputComponent.vue b/frontend/src/components/forms/AutoCompleteInputComponent.vue index 6da592f9f7..672f47e265 100644 --- a/frontend/src/components/forms/AutoCompleteInputComponent.vue +++ b/frontend/src/components/forms/AutoCompleteInputComponent.vue @@ -112,6 +112,9 @@ watch( inputValue.value = props.modelValue; if (!isUserEvent.value && cdsComboBoxRef.value) { cdsComboBoxRef.value._filterInputValue = props.modelValue || ""; + + // Validate the SELECTED value immediately. + validateInput(props.modelValue); } isUserEvent.value = false; }, diff --git a/frontend/stub/__files/response-address-G1V2W5.json b/frontend/stub/__files/response-address-G1V2W5.json new file mode 100644 index 0000000000..cf4e84aa13 --- /dev/null +++ b/frontend/stub/__files/response-address-G1V2W5.json @@ -0,0 +1,15 @@ +{ + "streetAddress": "866 Liénard St", + "country": { + "value": "CA", + "text": "Canada" + }, + "province": { + "value": "QC", + "text": "Quebec" + }, + "city": "Québec", + "postalCode": "G1V 2W5", + "index": 0, + "locationName": null +} \ No newline at end of file diff --git a/frontend/stub/__files/response-address-search-CA.json b/frontend/stub/__files/response-address-search-CA.json index ad40f4407b..24985aba6a 100644 --- a/frontend/stub/__files/response-address-search-CA.json +++ b/frontend/stub/__files/response-address-search-CA.json @@ -86,5 +86,9 @@ { "code": "B5V6L4", "name": "9084 Concession Road 6 Charlottetown, QC, B5V 6L4" + }, + { + "code": "G1V2W5", + "name": "866 Liénard St Québec, QC, G1V 2W5" } ]