mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2025-04-28 21:39: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"
|
AdornmentIcon="@Icons.Material.Filled.Label"
|
||||||
AdornmentColor="Color.Info"
|
AdornmentColor="Color.Info"
|
||||||
Validation="@this.ValidateName"
|
Validation="@this.ValidateName"
|
||||||
|
Counter="26"
|
||||||
|
MaxLength="26"
|
||||||
|
Immediate="@true"
|
||||||
UserAttributes="@SPELLCHECK_ATTRIBUTES"
|
UserAttributes="@SPELLCHECK_ATTRIBUTES"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
@ -24,7 +27,10 @@
|
|||||||
Adornment="Adornment.Start"
|
Adornment="Adornment.Start"
|
||||||
AdornmentIcon="@Icons.Material.Filled.Extension"
|
AdornmentIcon="@Icons.Material.Filled.Extension"
|
||||||
AdornmentColor="Color.Info"
|
AdornmentColor="Color.Info"
|
||||||
|
Counter="56"
|
||||||
|
MaxLength="56"
|
||||||
Validation="@this.ValidateType"
|
Validation="@this.ValidateType"
|
||||||
|
Immediate="@true"
|
||||||
UserAttributes="@SPELLCHECK_ATTRIBUTES"
|
UserAttributes="@SPELLCHECK_ATTRIBUTES"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
|
@ -86,6 +86,9 @@ public partial class EmbeddingMethodDialog : ComponentBase
|
|||||||
if (string.IsNullOrWhiteSpace(name))
|
if (string.IsNullOrWhiteSpace(name))
|
||||||
return "The embedding name must not be empty. Please name the embedding.";
|
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;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -94,6 +97,9 @@ public partial class EmbeddingMethodDialog : ComponentBase
|
|||||||
if (string.IsNullOrWhiteSpace(type))
|
if (string.IsNullOrWhiteSpace(type))
|
||||||
return "The embedding type must not be empty. Please specify the embedding 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;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user