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: trim input in @IsEnum decorator before comparsion #1700

Closed
wants to merge 102 commits into from

Conversation

rahul-rocket
Copy link

@rahul-rocket rahul-rocket commented Jul 20, 2022

Description

Applied trim on enum string to remove unnecessary white space for @IsEnum() decorator.

Checklist

  • the pull request title describes what this PR does (not a vague title like Update index.md)
  • the pull request targets the default branch of the repository (develop)
  • the code follows the established code style of the repository
    • npm run prettier:check passes
    • npm run lint:check passes
  • tests are added for the changes I made (if any source code was modified)
  • documentation added or updated
  • I have run the project locally and verified that there are no errors

Fixes

none

dependabot bot added 30 commits November 22, 2021 09:06
dependabot bot and others added 19 commits March 16, 2022 09:05
jotamorais pushed a commit to jotamorais/class-validator that referenced this pull request Oct 7, 2022
…but it the function isn't always available in the anonymous/generic type
@NoNameProvided
Copy link
Member

This is something we don't want. value doesn't equal to value and we want to catch that.

If you need this you can use it as a custom decorator.

@NoNameProvided NoNameProvided changed the title fix: enum string trim support for @IsEnum fix: trim input in @IsEnum decorator before comparsion Nov 20, 2022
@NoNameProvided NoNameProvided changed the title fix: trim input in @IsEnum decorator before comparsion feat: trim input in @IsEnum decorator before comparsion Nov 20, 2022
@github-actions
Copy link

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 21, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Development

Successfully merging this pull request may close these issues.

3 participants