CSR-319: update repair/replace validation logic
This commit is contained in:
parent
d95e6c10dd
commit
00e62c4240
1 changed files with 5 additions and 1 deletions
|
|
@ -37,7 +37,11 @@ defineRule("windshield-chip-count-required", required(errorMessages.WINDSHIELD_C
|
|||
defineRule("windshield-replace-options-required", required(errorMessages.WINSHIELD_REPLACE_OPTIONS_REQUIRED));
|
||||
|
||||
defineRule("checkForRepairAndReplace", (value, [other]) => {
|
||||
if (value.toString().toUpperCase().includes("REPAIR") && other.toString().toUpperCase().includes("WINDSHIELD") && other.length > 1) {
|
||||
if (value.toString().toUpperCase().includes("REPAIR") &&
|
||||
other.toString().toUpperCase().includes("WINDSHIELD") &&
|
||||
Array.isArray(other) &&
|
||||
other.length > 1)
|
||||
{
|
||||
return "checkForRepairAndReplace error"
|
||||
}
|
||||
return true;
|
||||
|
|
|
|||
Loading…
Reference in a new issue