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()
|
||||
.WithMessage("RESULT requires ResultActionId (maps to @pRESULT_ACTION_ID).");
|
||||
|
||||
RuleFor(x => x.Result!.StatusId)
|
||||
.NotNull()
|
||||
.WithMessage("RESULT requires ResultStatusId (maps to @pRESULT_STATUS_ID).");
|
||||
RuleFor(x => x.Result!)
|
||||
.Must(r => r.StatusId != null || r.Info != null || r.Error != null)
|
||||
.WithMessage("RESULT requires at least one of: StatusId, Info, or Error.");
|
||||
});
|
||||
|
||||
// ENDPOINT_PARAMS validation
|
||||
|
||||
Reference in New Issue
Block a user