-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
33 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -105,7 +105,7 @@ public async Task<List<ValidationIssue>> ValidateDataElement(Instance instance, | |
string app = instance.AppId.Split("/")[1]; | ||
int instanceOwnerPartyId = int.Parse(instance.InstanceOwner.PartyId); | ||
var data = await _dataClient.GetFormData(instanceGuid, modelType, instance.Org, app, instanceOwnerPartyId, Guid.Parse(dataElement.Id)); // TODO: Add method that accepts instance and dataElement | ||
var formDataIssuesDictionary = await ValidateFormData(instance, dataElement, data, null); | ||
var formDataIssuesDictionary = await ValidateFormData(instance, dataElement, dataType, data, null); | ||
|
||
return (await dataElementsIssuesTask).SelectMany(x=>x) | ||
.Concat(formDataIssuesDictionary.SelectMany(kv=>kv.Value)) | ||
|
@@ -117,7 +117,7 @@ public async Task<List<ValidationIssue>> ValidateDataElement(Instance instance, | |
|
||
/// <inheritdoc/> | ||
public async Task<Dictionary<string, List<ValidationIssue>>> ValidateFormData(Instance instance, | ||
DataElement dataElement, object data, List<string>? changedFields = null) | ||
DataElement dataElement, DataType dataType, object data, List<string>? changedFields = null) | ||
{ | ||
ArgumentNullException.ThrowIfNull(instance); | ||
ArgumentNullException.ThrowIfNull(dataElement); | ||
|
@@ -141,7 +141,7 @@ public async Task<Dictionary<string, List<ValidationIssue>>> ValidateFormData(In | |
try | ||
{ | ||
_logger.LogDebug("Start running validator {validatorName} on {dataType} for data element {dataElementId} in instance {instanceId}", v.GetType().Name, dataElement.DataType, dataElement.Id, instance.Id); | ||
Check failure Code scanning / CodeQL Log entries created from user input High
This log entry depends on a
user-provided value Error loading related location Loading This log entry depends on a user-provided value Error loading related location Loading This log entry depends on a user-provided value Error loading related location Loading This log entry depends on a user-provided value Error loading related location Loading This log entry depends on a user-provided value Error loading related location Loading This log entry depends on a user-provided value Error loading related location Loading This log entry depends on a user-provided value. This log entry depends on a user-provided value. Check failure Code scanning / CodeQL Log entries created from user input High
This log entry depends on a
user-provided value Error loading related location Loading This log entry depends on a user-provided value Error loading related location Loading This log entry depends on a user-provided value Error loading related location Loading This log entry depends on a user-provided value Error loading related location Loading This log entry depends on a user-provided value Error loading related location Loading This log entry depends on a user-provided value Error loading related location Loading This log entry depends on a user-provided value. This log entry depends on a user-provided value. Check failure Code scanning / CodeQL Log entries created from user input High
This log entry depends on a
user-provided value Error loading related location Loading This log entry depends on a user-provided value Error loading related location Loading This log entry depends on a user-provided value Error loading related location Loading This log entry depends on a user-provided value Error loading related location Loading This log entry depends on a user-provided value Error loading related location Loading This log entry depends on a user-provided value Error loading related location Loading This log entry depends on a user-provided value. This log entry depends on a user-provided value. |
||
var issues = await v.ValidateFormData(instance,dataElement, data, changedFields); | ||
var issues = await v.ValidateFormData(instance, dataElement, data, changedFields); | ||
if (v.Code is not null) | ||
{ | ||
issues.ForEach(i=>i.Code = v.Code);// Ensure that the code is set to the validator code | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters