diff --git a/packages/core/database/src/fields/uid-field.ts b/packages/core/database/src/fields/uid-field.ts index 358202fe59..cd80119d1c 100644 --- a/packages/core/database/src/fields/uid-field.ts +++ b/packages/core/database/src/fields/uid-field.ts @@ -17,7 +17,9 @@ export class UidField extends Field { } else if (re.test(value)) { instance.set(name, value); } else { - throw new Error(`Field names can only include A-Z, a-z, 0-9, _-*$, '${value}' is invalid`); + throw new Error( + `${this.collection.name}.${this.options.name} can only include A-Z, a-z, 0-9, _-*$, '${value}' is invalid`, + ); } }; }