diff --git a/app/MindWork AI Studio/Assistants/DocumentAnalysis/DocumentAnalysisAssistant.razor.cs b/app/MindWork AI Studio/Assistants/DocumentAnalysis/DocumentAnalysisAssistant.razor.cs index d5418cdc..4a43adbc 100644 --- a/app/MindWork AI Studio/Assistants/DocumentAnalysis/DocumentAnalysisAssistant.razor.cs +++ b/app/MindWork AI Studio/Assistants/DocumentAnalysis/DocumentAnalysisAssistant.razor.cs @@ -476,23 +476,6 @@ public partial class DocumentAnalysisAssistant : AssistantBaseCore 60 or < 6) - return T("The name of your policy must be between 6 and 60 characters long."); - - if(this.SettingsManager.ConfigurationData.DocumentAnalysis.Policies.Where(n => n != this.selectedPolicy).Any(n => n.PolicyName == name)) - return T("A policy with this name already exists. Please choose a different name."); - - return null; - } #region Overrides of MSGComponentBase @@ -559,6 +542,23 @@ public partial class DocumentAnalysisAssistant : AssistantBaseCore 60 or < 6) + return T("The name of your policy must be between 6 and 60 characters long."); + + if(this.SettingsManager.ConfigurationData.DocumentAnalysis.Policies.Where(n => n != this.selectedPolicy).Any(n => n.PolicyName == name)) + return T("A policy with this name already exists. Please choose a different name."); + + return null; + } + private string? ValidatePolicyDescription(string description) { if(this.selectedPolicy?.IsEnterpriseConfiguration == true)