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;
|
return errors;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -312,7 +312,7 @@
|
|||||||
<labels>
|
<labels>
|
||||||
<label description="Please submit your Cost Application" hint="newappeal:new-appeal-cost-application-hint" />
|
<label description="Please submit your Cost Application" hint="newappeal:new-appeal-cost-application-hint" />
|
||||||
</labels>
|
</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>
|
||||||
<row>
|
<row>
|
||||||
<labels>
|
<labels>
|
||||||
|
|||||||
Reference in New Issue
Block a user