Fix validation so it recognizes when a field has info in it.

This commit is contained in:
bmauger 2022-05-04 16:13:28 -04:00
parent 7b8ad775cf
commit 269ca9e25c
2 changed files with 10 additions and 5 deletions

View file

@ -57,8 +57,13 @@ export default {
const fieldOptions = {
type: "text",
value: props.modelValue,
potentialInitialValue: props.modelValue,
};
if (props.modelValue && props.modelValue.length > 0) {
fieldOptions['initialValue'] = fieldOptions.potentialInitialValue;
}
const {
errorMessage,
handleBlur,
@ -98,10 +103,10 @@ export default {
words.forEach(function (word) {
const position = 1;
word = [word.toString().slice(0, position), noBreakChar, word.toString().slice(position)].join('');
questionText += `${word} `;
});
questionText = questionText.trimEnd();
questionText += `${word} `;
});
questionText = questionText.trimEnd();
} else {
questionText = this.questionText.toString();
}

View file

@ -93,7 +93,7 @@ async function getLatestPageForRedirection() {
return fmgPageValues.VEHICLE_DAMAGE;
} else {
if (store.getters.vehicle.vin) {
return fmgPageValues.VIN_LOOKUP;
return fmgPageValues.LICENSE_PLATE_LOOKUP;
} else {
return fmgPageValues.VIN_LOOKUP;
}