Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: Use different source for custom validation #314

Merged
merged 1 commit into from
Sep 25, 2023

Conversation

bjosttveit
Copy link
Member

@bjosttveit bjosttveit commented Sep 25, 2023

It turns out that custom validation modifies the same ModelStateDictionary as the data model validation, meaning that custom validation would get mapped with the same Source as data model validation and would be filtered out in the frontend. This PR keeps the validations separate and gives them different Source-fields.

Description

Related Issue(s)

Verification

  • Your code builds clean without any errors or warnings
  • Manual testing done (required)
  • Relevant automated test added (if you find this hard, leave it and we'll help out)
  • All tests run green

Documentation

  • User documentation is updated with a separate linked PR in altinn-studio-docs. (if applicable)

@sonarcloud
Copy link

sonarcloud bot commented Sep 25, 2023

SonarCloud Quality Gate failed.    Quality Gate failed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

6.2% 6.2% Coverage
0.0% 0.0% Duplication

idea Catch issues before they fail your Quality Gate with our IDE extension sonarlint SonarLint

@bjosttveit bjosttveit marked this pull request as ready for review September 25, 2023 09:19
Copy link
Member

@tjololo tjololo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:godmode:

@bjosttveit bjosttveit merged commit 87fe4b9 into main Sep 25, 2023
11 of 12 checks passed
@bjosttveit bjosttveit deleted the fix-custom-validation-source branch September 25, 2023 14:05
@tjololo tjololo added the bugfix Label Pull requests with bugfix. Used when generation releasenotes label Sep 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugfix Label Pull requests with bugfix. Used when generation releasenotes
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants