From 9ecf6d035fff23122d1da95c1e7d275626d0e64d Mon Sep 17 00:00:00 2001 From: ouellette Date: Thu, 25 May 2023 16:41:06 -0700 Subject: [PATCH] Added in form validation in the view for Corrective Action Items --- .../Views/CorrectiveAction/Edit.cshtml | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/Fab2ApprovalSystem/Views/CorrectiveAction/Edit.cshtml b/Fab2ApprovalSystem/Views/CorrectiveAction/Edit.cshtml index 98602ab..17a696d 100644 --- a/Fab2ApprovalSystem/Views/CorrectiveAction/Edit.cshtml +++ b/Fab2ApprovalSystem/Views/CorrectiveAction/Edit.cshtml @@ -4275,7 +4275,18 @@ alert('The following fields are required if the [Implemented Date] field is filled \n' + errorMessage ) ; return false; } - } + } + if (data.CorrectiveAction.length > 1000) { + $('#cover-spin').hide(0); + alert("Corrective Action field must be less than 1000 characters! Data not saved!"); + return false; + } + if (data.Result.length > 1000) { + $('#cover-spin').hide(0); + alert("Result field must be less than 1000 characters! Data not saved!"); + return false; + } + return true; @@ -4326,7 +4337,6 @@ ResponsibilityOwnerID: $("#D5D6ResponsibilityOwnerIds").data("kendoDropDownList").value(), ImprovementID: d5d6ImprovementIDs + ',' } - alert(objectData.Result); } return objectData;