Repository navigation
feat(concerto-cto): allow validators in any order in field declarations - #1305
Merged
Merged
Conversation
Signed-off-by: muhammed-abdulkadir <muhammed.abdulkadir@docusign.com>
Signed-off-by: muhammed-abdulkadir <muhammed.abdulkadir@docusign.com>
mttrbrts
approved these changes
Aug 28, 2026
mttrbrts
left a comment
Member
There was a problem hiding this comment.
Nicely done, thanks Muh. Can you patch up the PR title, and check that the old issue is closed?
mttrbrts
pushed a commit
that referenced
this pull request
Sep 3, 2026
…eping the last (#1314) The any-order validator collection introduced in #1305 buckets validators by $class with plain assignment, so regex=/a/ regex=/b/ now parses and silently drops /a/. The same applies to length, range and size, on both fields and scalars; before #1305 the grammar rejected all of these. A modeler's constraint being silently discarded weakens validation. The grammar initializer gains a bucketValidators helper that raises a located 'Duplicate <kind> validator' error on a repeat, used by all five reducer rules. src/parser.js regenerated with npm run parser, matching the convention of committing the generated parser. Seven tests added covering duplicate regex, length, range (Integer, Double, Long) and size on fields plus regex on a scalar; all fail on the unfixed grammar and every any-order valid case from #1305 still parses. Signed-off-by: rajanpanth <rajan.pantha@samriddhicollege.edu.np>
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #
Validators (regex, length, range, size) are no longer positionally fixed in the PEG grammar; they can appear in any order between default and optional
o String x length=[1,10] regex=/abc/would fail to parse becauseregexhad to come beforelength$classAuthor Checklist
--signoffoption of git commit.mainfromfork:branchname