WIP Сделала валидацию на страховках

This commit is contained in:
Daria Golova
2023-08-24 15:24:05 +03:00
parent cb41a00ae1
commit d1c5dc5683
5 changed files with 336 additions and 270 deletions

View File

@@ -8,8 +8,8 @@ export function ruleLengthValue(val, minLength, text) {
return (val && val.length === minLength) || text || false;
}
export function ruleOptionalFields(val, minLength, text) {
return !val || val.length === minLength || text || false;
export function ruleOptionalFields(val, minLength, id, text) {
return (!val && !id) || val.length === minLength || text || false;
}
export function ruleEmailValue(val, text) {