mirror of
https://github.com/meilisearch/MeiliSearch
synced 2024-11-26 23:04:26 +01:00
Change the index uid format check for better legibility
This commit is contained in:
parent
3e5d6be86b
commit
96d4fd54bb
@ -110,7 +110,8 @@ impl FromStr for IndexUid {
|
||||
if !uid
|
||||
.chars()
|
||||
.all(|x| x.is_ascii_alphanumeric() || x == '-' || x == '_')
|
||||
|| !(1..=400).contains(&uid.len())
|
||||
|| uid.is_empty()
|
||||
|| uid.len() > 400
|
||||
{
|
||||
Err(IndexUidFormatError {
|
||||
invalid_uid: uid.to_string(),
|
||||
|
Loading…
Reference in New Issue
Block a user