Change the index uid format check for better legibility

This commit is contained in:
walter 2022-06-08 19:58:47 -04:00
parent 3e5d6be86b
commit 96d4fd54bb
1 changed files with 2 additions and 1 deletions

View File

@ -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(),