updated validation for cost applciation

This commit is contained in:
2024-11-27 11:13:31 +00:00
parent 85f323d580
commit 7b6862c350
2 changed files with 16 additions and 1 deletions
+15
View File
@@ -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;
};
+1 -1
View File
@@ -312,7 +312,7 @@
<labels>
<label description="Please submit your Cost Application" hint="newappeal:new-appeal-cost-application-hint" />
</labels>
<control validation="[required]" id="pinswg_costapplication" parentField="pinswg_costappliedforindicator" parentFieldShowOnValue="true" classid="{E0DECE4B-6666-4a8f-A065-082708572369}" datafieldname="pinswg_costapplication" maxFieldLength="5000" disabled="false" />
<control id="pinswg_costapplication" parentField="pinswg_costappliedforindicator" parentFieldShowOnValue="true" classid="{E0DECE4B-6666-4a8f-A065-082708572369}" datafieldname="pinswg_costapplication" maxFieldLength="5000" disabled="false" />
</row>
<row>
<labels>