mirror of
https://github.com/meilisearch/meilisearch.git
synced 2025-07-27 00:31:02 +00:00
Change the index uid format check for better legibility
This commit is contained in:
@ -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(),
|
||||
|
Reference in New Issue
Block a user