Skip to content

Commit

Permalink
Release v2.0.2 (#89)
Browse files Browse the repository at this point in the history
  • Loading branch information
Dulajdeshan authored Nov 16, 2024
2 parents 45566ac + 74ca3b0 commit 80dc145
Show file tree
Hide file tree
Showing 2 changed files with 213 additions and 290 deletions.
4 changes: 2 additions & 2 deletions server/src/services/service.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { Core } from '@strapi/strapi';
import { errors } from '@strapi/utils';
import { generateUUID, validateUUID } from '../../../admin/src/utils/helpers';
import { generateUUID, isValidUUIDValue } from '../../../admin/src/utils/helpers';

const { YupValidationError } = errors;

Expand Down Expand Up @@ -37,7 +37,7 @@ const service = ({ strapi }: { strapi: Core.Strapi }) => ({
// - If disableAutoFill is not enabled
// - If there is an initial value
if (!disableAutoFill || initialValue) {
if (!validateUUID(uuidFormat, event.params.data[attribute])) {
if (!isValidUUIDValue(uuidFormat, event.params.data[attribute])) {
errorMessages.inner.push({
name: 'ValidationError', // Always set to ValidationError
path: attribute, // Name of field we want to show input validation on
Expand Down
Loading

0 comments on commit 80dc145

Please sign in to comment.