validate zip code length
This commit is contained in:
hiteshkumar87 2025-05-16 12:30:14 +05:30
parent b43daeb555
commit 0e7d2430ce

View file

@ -237,7 +237,10 @@ export default {
async setMobileLocation() { async setMobileLocation() {
this.resetAlerts(); this.resetAlerts();
// Validate the Zip Code // Validate the Zip Code
if (this.internalModel.addressQuestions.zipCode === "") { if (
this.internalModel.addressQuestions.zipCode === "" ||
this.internalModel.addressQuestions.zipCode.length !== 5
) {
this.setMobileLocationInvalid(true); this.setMobileLocationInvalid(true);
return; return;
} }