dce-reactkit 3.4.0-beta.7 → 3.4.0-beta.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cjs/index.js CHANGED
@@ -39759,7 +39759,7 @@ const AddOrEditDBEntry = (props) => {
39759
39759
  return validationError;
39760
39760
  }
39761
39761
  // Check if unique field is unique
39762
- if (field.objectKey === idPropName) {
39762
+ if (field.objectKey === idPropName && !dbEntryToEdit) {
39763
39763
  if (entries.find((e) => { return e[idPropName] === value; })) {
39764
39764
  validationError = `An item with the ${field.label} ${value} already exists. ${field.label} must be unique.`;
39765
39765
  return validationError;