Dulajdeshan / strapi-advanced-uuid

UUID field type support to Strapi with custom regular expressions
MIT License
16 stars 7 forks source link

fix(service): properly validate UUID if the format is omitted #88

Closed P0Xyio closed 4 days ago

P0Xyio commented 6 days ago

Encountered an error when adding an entry to a collection type using strapi-advanced-uuid. The issue was that the validateUUID function did not account for a default format. Updated the code to use an existing function that validates the UUID regardless of whether a format is provided.

[2024-11-14 14:28:03.742] error: You have some issues ValidationError: You have some issues at Object.handleCRUDOperation (D:\*****\node_modules\strapi-advanced-uuid\dist\server\index.js:25091:13) at Object.beforeUpdate (D:\*****\node_modules\strapi-advanced-uuid\dist\server\index.js:52:54) at Object.run (D:\*****\node_modules\@strapi\database\dist\index.js:6844:37) at async Object.update (D:\*****\node_modules\@strapi\database\dist\index.js:5435:22) at async update (D:\*****\node_modules\@strapi\core\dist\services\document-service\repository.js:173:22) at async D:\*****\node_modules\@strapi\database\dist\index.js:7044:21 at async Array.databaseErrorsMiddleware (D:\*****\node_modules\@strapi\core\dist\services\document-service\middlewares\errors.js:13:12) at async Object.update (D:\*****\node_modules\@strapi\content-manager\dist\server\index.js:2004:28) at async returnBodyMiddleware (D:\*****\node_modules\@strapi\core\dist\services\server\compose-endpoint.js:45:18) at async routing (D:\*****\node_modules\@strapi\content-manager\dist\server\index.js:942:3)

github-actions[bot] commented 4 days ago

:tada: This PR is included in version 2.0.2 :tada:

The release is available on:

Your semantic-release bot :package::rocket: