Skip to content

Commit 5d121b3

Browse files
committed
Code rabbit
1 parent 6f4d79f commit 5d121b3

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

  • src/Altinn.App.Core/Features/Validation/Default
  • test/Altinn.App.Api.Tests/Data/apps/tdd/contributer-restriction/models

src/Altinn.App.Core/Features/Validation/Default/XsdValidator.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ namespace Altinn.App.Core.Features.Validation.Default;
1212
/// <summary>
1313
/// Validates form data against the XSD schema for the data model, if it exists
1414
/// </summary>
15-
public class XsdValidator : IValidator
15+
internal sealed class XsdValidator : IValidator
1616
{
1717
private readonly ILogger<XsdValidator> _logger;
1818
private readonly IAppResources _appResourceService;
@@ -109,6 +109,7 @@ public async Task<List<ValidationIssue>> Validate(
109109
Schemas = parsedSchema,
110110
DtdProcessing = DtdProcessing.Prohibit,
111111
XmlResolver = null,
112+
CloseInput = true,
112113
};
113114
settings.ValidationEventHandler += (sender, e) =>
114115
{

test/Altinn.App.Api.Tests/Data/apps/tdd/contributer-restriction/models/Skjema.xsd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="utf-8"?>
2-
<!-- NOTE: The scheam was generated by AI, not studio, and is probably not in sync-->
2+
<!-- NOTE: The schema was generated by AI, not studio, and is probably not in sync-->
33

44
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
55

0 commit comments

Comments
 (0)