Add contract type check to envelope validation

ValidateEnvelopeForSending now skips element checks if the envelope does not require a signature (i.e., contract type is not ReadAndSign), preventing unnecessary validation for such envelopes.
This commit is contained in:
2026-01-23 17:37:14 +01:00
parent 1e2e018f7f
commit 796b233ba4

View File

@@ -50,6 +50,11 @@ Public Class EnvelopeEditorController
Public Function ValidateEnvelopeForSending(pErrors As List(Of String)) As List(Of String)
Dim oEnvelopeErrors = pErrors
Dim requiresSignature = (Envelope.ContractType = ContractType.ReadAndSign)
If requiresSignature = False Then
Return oEnvelopeErrors
End If
If ElementModel.ElementsExist(Envelope.Id) = False Then
oEnvelopeErrors.Add(Resources.Envelope.Missing_Elements)
End If