mirror of
https://gitee.com/milvus-io/milvus.git
synced 2026-01-07 19:31:51 +08:00
enhance: Refine name rule check error msg (#33815)
Signed-off-by: Wei Liu <wei.liu@zilliz.com>
This commit is contained in:
parent
95148866ed
commit
188ee433b9
@ -268,7 +268,7 @@ func validateFieldName(fieldName string) error {
|
||||
for i := 1; i < fieldNameSize; i++ {
|
||||
c := fieldName[i]
|
||||
if c != '_' && !isAlpha(c) && !isNumber(c) {
|
||||
msg := invalidMsg + "Field name cannot only contain numbers, letters, and underscores."
|
||||
msg := invalidMsg + "Field name can only contain numbers, letters, and underscores."
|
||||
return merr.WrapErrFieldNameInvalid(fieldName, msg)
|
||||
}
|
||||
}
|
||||
@ -1073,7 +1073,7 @@ func validateIndexName(indexName string) error {
|
||||
for i := 1; i < indexNameSize; i++ {
|
||||
c := indexName[i]
|
||||
if c != '_' && !isAlpha(c) && !isNumber(c) {
|
||||
msg := invalidMsg + "Index name cannot only contain numbers, letters, and underscores."
|
||||
msg := invalidMsg + "Index name can only contain numbers, letters, and underscores."
|
||||
return errors.New(msg)
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user