1
0

More reasonable length restrictions (#458)

This commit is contained in:
Geometrically
2022-09-26 18:09:50 -07:00
committed by GitHub
parent 75b7583832
commit 3e52f804a7
5 changed files with 11 additions and 11 deletions

View File

@@ -167,10 +167,10 @@ pub async fn version_get(
#[derive(Serialize, Deserialize, Validate)]
pub struct EditVersion {
#[validate(length(min = 1, max = 256))]
#[validate(length(min = 1, max = 64))]
pub name: Option<String>,
#[validate(
length(min = 1, max = 64),
length(min = 1, max = 32),
regex = "crate::util::validate::RE_URL_SAFE"
)]
pub version_number: Option<String>,