mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2025-04-28 17:59:46 +00:00
Limit the embedding name and type length
This commit is contained in:
parent
81790b99de
commit
169e1cb601
@ -12,6 +12,9 @@
|
||||
AdornmentIcon="@Icons.Material.Filled.Label"
|
||||
AdornmentColor="Color.Info"
|
||||
Validation="@this.ValidateName"
|
||||
Counter="26"
|
||||
MaxLength="26"
|
||||
Immediate="@true"
|
||||
UserAttributes="@SPELLCHECK_ATTRIBUTES"
|
||||
/>
|
||||
|
||||
@ -24,7 +27,10 @@
|
||||
Adornment="Adornment.Start"
|
||||
AdornmentIcon="@Icons.Material.Filled.Extension"
|
||||
AdornmentColor="Color.Info"
|
||||
Counter="56"
|
||||
MaxLength="56"
|
||||
Validation="@this.ValidateType"
|
||||
Immediate="@true"
|
||||
UserAttributes="@SPELLCHECK_ATTRIBUTES"
|
||||
/>
|
||||
|
||||
|
@ -86,6 +86,9 @@ public partial class EmbeddingMethodDialog : ComponentBase
|
||||
if (string.IsNullOrWhiteSpace(name))
|
||||
return "The embedding name must not be empty. Please name the embedding.";
|
||||
|
||||
if (name.Length > 26)
|
||||
return "The embedding name must not be longer than 26 characters.";
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
@ -94,6 +97,9 @@ public partial class EmbeddingMethodDialog : ComponentBase
|
||||
if (string.IsNullOrWhiteSpace(type))
|
||||
return "The embedding type must not be empty. Please specify the embedding type.";
|
||||
|
||||
if (type.Length > 56)
|
||||
return "The embedding type must not be longer than 56 characters.";
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user