diff --git a/generators/bootstrap-application-base/utils.js b/generators/bootstrap-application-base/utils.js index 420a95b36cd4..b9c5518cc955 100644 --- a/generators/bootstrap-application-base/utils.js +++ b/generators/bootstrap-application-base/utils.js @@ -114,7 +114,6 @@ export function createUserEntity(customUserData = {}, application) { fieldValidateRulesMaxlength, fieldTranslationKey: 'global.field.id', fieldNameHumanized: 'ID', - fieldValidateRules: [Validations.REQUIRED], readonly: true, id: true, builtIn: true, @@ -200,6 +199,7 @@ export function createUserManagementEntity(customUserManagementData = {}, applic field.id = true; } else if (field.fieldName === 'id') { field.id = false; + field.fieldValidateRules = [Validations.REQUIRED]; // Set id type fallback since it's not id anymore and will not be calculated. field.fieldType = field.fieldType ?? getDatabaseTypeData(application.databaseType).defaultPrimaryKeyType; }