Closed mirkoSekulic closed 1 year ago
org/ssb
We found this issue too. The bigger issue in my opinion is that the [RegularExpression(...)]
annotations seems rather useless when the error message is displayed this way:
Why would you even bother using a regular expression to verify that the stringified version of a decimal
datatype looks like a number. decimal
can never be anything else than a number.
Description of the bug
TotalDigits restriction is converted to c# class as regex that doesn't allow negative numbers.
Change regexes in Altinn.Studio.DataModeling.Utils.RestrictionsHelper class so they support negative numbers. Example: Change
to
Enrich RestrictionHelperTests test data with negative numbers
Steps To Reproduce
Run CsharpEnd2EndGenerationTests.Convert_FromXsd_ShouldConvertToSameCSharp test with xsd that contains totalDigits restriction.
Additional Information
No response