class-validator icon indicating copy to clipboard operation
class-validator copied to clipboard

fix: update UUID validation to support versions 1-8, nil, max, and all

Open PleBea opened this issue 1 month ago • 2 comments

Description

Updated the IsUUID tests to align with the updated JSDoc, which specifies support for all UUID versions (1-8, nil, max, all).

Previously, the tests primarily covered versions 3, 4, and 5. I have added test cases to verify that the IsUUID decorator correctly validates all UUID specifications supported by the underlying validator.js library, including versions 1, 2, 6, 7, 8, nil, and max.

Checklist

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

Fixes

fixes #2581 fixed #2648

PleBea avatar Nov 30 '25 17:11 PleBea

Maybe #2648 can also be fixed with this PR? Since it's the same validator that requires an update

WikiRik avatar Dec 05 '25 06:12 WikiRik

Maybe #2648 can also be fixed with this PR? Since it's the same validator that requires an update

Yes, that's correct. This PR now specifically addresses issue #2648 as well.

I've made a small adjustment/tweak to the relevant code (the validator) to ensure it correctly fixes #2648. Once this PR is merged, we can close that issue.

PleBea avatar Dec 05 '25 09:12 PleBea