Skip to content

Commit d17f142

Browse files
committed
[CHORE] Increase collection name allowed by validator
1 parent 8031bb7 commit d17f142

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

rust/types/src/validators.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ use std::{net::IpAddr, sync::LazyLock};
66
use validator::ValidationError;
77

88
static ALNUM_RE: LazyLock<Regex> = LazyLock::new(|| {
9-
Regex::new(r"^[a-zA-Z0-9][a-zA-Z0-9._-]{1, 61}[a-zA-Z0-9]$")
9+
Regex::new(r"^[a-zA-Z0-9][a-zA-Z0-9._-]{1, 510}[a-zA-Z0-9]$")
1010
.expect("The alphanumeric regex should be valid")
1111
});
1212

@@ -35,7 +35,7 @@ pub(crate) fn validate_non_empty_metadata<V>(
3535
pub(crate) fn validate_name(name: impl AsRef<str>) -> Result<(), ValidationError> {
3636
let name_str = name.as_ref();
3737
if !ALNUM_RE.is_match(name_str) {
38-
return Err(ValidationError::new("name").with_message(format!("Expected a name containing 3-63 characters from [a-zA-Z0-9._-], starting and ending with a character in [a-zA-Z0-9]. Got: {name_str}").into()));
38+
return Err(ValidationError::new("name").with_message(format!("Expected a name containing 3-512 characters from [a-zA-Z0-9._-], starting and ending with a character in [a-zA-Z0-9]. Got: {name_str}").into()));
3939
}
4040

4141
if DP_RE.is_match(name_str) {

0 commit comments

Comments
 (0)