Александр Семкин, [05.09.2022 14:30]
т.е. верификация проводится только в случае наличия значения в поле Александр Семкин, [05.09.2022 14:30] т.е. я могу сделать расчет и без VIN
This commit is contained in:
parent
531c6cd266
commit
d693d40912
@ -354,13 +354,15 @@ export default function ($calculation: ICalculationStore) {
|
||||
};
|
||||
},
|
||||
({ vin }) => {
|
||||
if ($calculation.getValue('leaseObjectCategory')) {
|
||||
$calculation.setValidation(
|
||||
'tbxVIN',
|
||||
vin.length === 17 && vinRegex.test(vin),
|
||||
);
|
||||
} else {
|
||||
$calculation.setValidation('tbxVIN', vinRegex.test(vin));
|
||||
if (vin) {
|
||||
if ($calculation.getValue('leaseObjectCategory')) {
|
||||
$calculation.setValidation(
|
||||
'tbxVIN',
|
||||
vin.length === 17 && vinRegex.test(vin),
|
||||
);
|
||||
} else {
|
||||
$calculation.setValidation('tbxVIN', vinRegex.test(vin));
|
||||
}
|
||||
}
|
||||
},
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user