You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
## Description of changes
Enable database name validation with support for topology-prefixed names
using the `+` delimiter (e.g., "topology+name"). The validation:
- Allows at most one `+` character in the name
- Validates both topology and name portions independently
- Enforces 512 character limit for topology-prefixed names
- Re-enables name validation in create_database endpoint
## Test plan
CI + staging
## Migration plan
Not necessary.
## Observability plan
N/A
## Documentation Changes
N/A
Co-authored-by: AI
"Expected a name to contain at most one topology: Got two `+` characters.".into(),
62
+
));
63
+
}
64
+
assert!(
65
+
!topo.chars().any(|c| c == '+'),
66
+
"split once should not bypass the split character"
67
+
);
68
+
validate_name(topo)?;
69
+
validate_name(name)?;
70
+
returnOk(());
71
+
}
72
+
45
73
if !ALNUM_RE.is_match(name_str){
46
74
returnErr(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()));
0 commit comments