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:
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user