Compare commits

1 Commits

Author SHA1 Message Date
796b233ba4 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.
2026-01-23 17:37:14 +01:00

View File

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