Format
This commit is contained in:
parent
61aeb06e0a
commit
bc3468f8d6
2 changed files with 5 additions and 5 deletions
|
|
@ -217,13 +217,11 @@ export default {
|
|||
} else {
|
||||
if (promoCodeData.errorCode == promoErrorCodes.PROMO_STACKING_NOT_ALLOWED) {
|
||||
this.displayInvalidOnOrderPromoAlert = true;
|
||||
this.focusOnPromoInput();
|
||||
this.resetModalButtonStyle();
|
||||
} else {
|
||||
this.displayInvalidPromoAlert = true;
|
||||
this.focusOnPromoInput();
|
||||
this.resetModalButtonStyle();
|
||||
}
|
||||
this.focusOnPromoInput();
|
||||
this.resetModalButtonStyle();
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
|
|||
|
|
@ -23,6 +23,8 @@ import { errorMessages } from "@/constants/error-messages";
|
|||
// Define Validation Rules
|
||||
defineRule("promo-required", required(errorMessages.PROMO_REQUIRED));
|
||||
|
||||
const ALPHANUMERIC_REGEX = /[^a-zA-Z0-9]/g;
|
||||
|
||||
export default {
|
||||
name: "promo-question",
|
||||
props: {
|
||||
|
|
@ -41,7 +43,7 @@ export default {
|
|||
},
|
||||
methods: {
|
||||
validateAlphanumeric() {
|
||||
this.value = this.value.replace(/[^a-zA-Z0-9]/g, "");
|
||||
this.value = this.value.replace(ALPHANUMERIC_REGEX, "");
|
||||
},
|
||||
},
|
||||
components: {
|
||||
|
|
|
|||
Loading…
Reference in a new issue