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

feat: Add pattern check to the name and the description of the items #371

Merged

Conversation

LautaroPetaccio
Copy link
Contributor

This PR adds a simple pattern to exclude any names and descriptions of items that disallows using : in them.

@coveralls
Copy link

Pull Request Test Coverage Report for Build 1536550106

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 64.404%

Totals Coverage Status
Change from base Build 1535204197: 0.0%
Covered Lines: 1780
Relevant Lines: 2612

💛 - Coveralls

Copy link
Contributor

@nicosantangelo nicosantangelo left a comment

Choose a reason for hiding this comment

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

question

Comment on lines +11 to +15
name: { type: 'string', maxLength: 32, pattern: '^[^:]*$' },
description: {
type: ['string', 'null'],
maxLength: 64,
pattern: '^[^:]*$',
Copy link
Contributor

Choose a reason for hiding this comment

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

shouldn't these have a + instead of an * ? or at least a minLength key?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The only check that the builder has is this one, there's sadly no check about the length. We could add one, but we'll be potentially introducing a breaking change.

@LautaroPetaccio LautaroPetaccio merged commit 044e2b9 into master Dec 7, 2021
@LautaroPetaccio LautaroPetaccio deleted the feat/add-text-patter-to-item-name-and-description branch December 7, 2021 13:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants