Relax RESULT validation to allow StatusId, Info, or Error
Previously, RESULT required a non-null StatusId. Now, validation passes if at least one of StatusId, Info, or Error is provided, making the requirements more flexible.
This commit is contained in:
@@ -58,9 +58,9 @@ public class InsertObjectProcedureValidator : AbstractValidator<InsertObjectProc
|
|||||||
.NotNull()
|
.NotNull()
|
||||||
.WithMessage("RESULT requires ResultActionId (maps to @pRESULT_ACTION_ID).");
|
.WithMessage("RESULT requires ResultActionId (maps to @pRESULT_ACTION_ID).");
|
||||||
|
|
||||||
RuleFor(x => x.Result!.StatusId)
|
RuleFor(x => x.Result!)
|
||||||
.NotNull()
|
.Must(r => r.StatusId != null || r.Info != null || r.Error != null)
|
||||||
.WithMessage("RESULT requires ResultStatusId (maps to @pRESULT_STATUS_ID).");
|
.WithMessage("RESULT requires at least one of: StatusId, Info, or Error.");
|
||||||
});
|
});
|
||||||
|
|
||||||
// ENDPOINT_PARAMS validation
|
// ENDPOINT_PARAMS validation
|
||||||
|
|||||||
Reference in New Issue
Block a user