updated validation for cost applciation
This commit is contained in:
@@ -712,6 +712,21 @@ const validate = (values) => {
|
||||
}
|
||||
}
|
||||
|
||||
if (values.hasOwnProperty("pinswg_costappliedforindicator")) {
|
||||
if (values.pinswg_costappliedforindicator == "true") {
|
||||
if (values.pinswg_attachcostapplication == "false") {
|
||||
if (values.hasOwnProperty("pinswg_costapplication")) {
|
||||
if (strippedHtml(values.pinswg_costapplication).length == 0)
|
||||
errors.pinswg_costapplication =
|
||||
"Enter submit a Cost application or select Yes to attach a separate Costs application";
|
||||
} else {
|
||||
errors.pinswg_costapplication =
|
||||
"Enter submit a Cost application or select Yes to attach a separate Costs application";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return errors;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user