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(Service Release): prevent only spaces in short & long description #1092

Merged

Conversation

charmi-v
Copy link
Contributor

Description

Service Release:

  • Updated regex to prevent descriptions consisting only of spaces.
  • Revised user validation error message.

Why

Validation error: The regex validation permits spaces as valid characters in the description.
However, it has a limitation: it allows users to pass field validation even if the description consists only of spaces.

Issue

#1021

Checklist

Please delete options that are not relevant.

  • I have followed the contributing guidelines
  • I have performed a self-review of my own code
  • I have successfully tested my changes locally

@MaximilianHauer
Copy link

MaximilianHauer commented Sep 13, 2024

as mentioned in #1021 (comment)

If someone wants to provide low quality on purpose he will always be able to execute it.
to improve it a bit we could check for at least one letter or digit in the regex but even this wouldn't protect us fully.
proposal : /^(?=.*[a-zA-Z0-9])(?! *$).{10,1999}$/
Explanation:

  • Are between 10 and 1999 characters long.
  • Do not consist solely of whitespace characters.
  • Contain at least one letter or digit.

@MaximilianHauer MaximilianHauer added this to the Release 24.12 milestone Sep 13, 2024
Copy link

@oyo oyo merged commit 6c4a0f9 into eclipse-tractusx:main Sep 17, 2024
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: USER READY
Development

Successfully merging this pull request may close these issues.

3 participants