Skip to content

Commit

Permalink
fix: remove non_control_characters validations (#250)
Browse files Browse the repository at this point in the history
  • Loading branch information
ramiroaisen authored Jan 15, 2024
2 parents c76fc3d + 6deba6b commit deb82d7
Show file tree
Hide file tree
Showing 16 changed files with 91 additions and 91 deletions.
2 changes: 1 addition & 1 deletion rs/packages/api/src/routes/accounts/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ pub mod post {
max = "VALIDATE_ACCOUNT_NAME_MAX_LEN",
message = "Account name is either too long or empty"
),
non_control_character(message = "Account name contains invalid characters")
// non_control_character(message = "Account name contains invalid characters")
)]
pub name: String,
pub plan_id: String,
Expand Down
6 changes: 3 additions & 3 deletions rs/packages/api/src/routes/admins/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ pub mod post {
max = "VALIDATE_ADMIN_FIRST_NAME_MAX_LEN",
message = "First name is either too short or too long",
),
non_control_character(message = "First name contains invalid characters")
// non_control_character(message = "First name contains invalid characters")
)]
pub first_name: String,

Expand All @@ -141,7 +141,7 @@ pub mod post {
max = "VALIDATE_ADMIN_LAST_NAME_MAX_LEN",
message = "Last name is either too short or too long",
),
non_control_character(message = "Last name contains invalid characters")
// non_control_character(message = "Last name contains invalid characters")
)]
pub last_name: String,

Expand All @@ -153,7 +153,7 @@ pub mod post {
max = "VALIDATE_ADMIN_EMAIL_MAX_LEN",
message = "Email is either too short or too long",
),
non_control_character(message = "Email contains invalid characters")
// non_control_character(message = "Email contains invalid characters")
)]
pub email: String,

Expand Down
12 changes: 6 additions & 6 deletions rs/packages/api/src/routes/auth/user/register.rs
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ pub mod post {
max = "VALIDATE_USER_FIRST_NAME_MAX_LEN",
message = "First name is either too short or too long"
),
non_control_character(message = "First name contains invalid characters")
// non_control_character(message = "First name contains invalid characters")
)]
first_name: String,

Expand All @@ -180,7 +180,7 @@ pub mod post {
max = "VALIDATE_USER_LAST_NAME_MAX_LEN",
message = "Last name is either too short or too long"
),
non_control_character(message = "Last name contains invalid characters")
// non_control_character(message = "Last name contains invalid characters")
)]
last_name: String,

Expand All @@ -191,7 +191,7 @@ pub mod post {
max = "VALIDATE_ACCOUNT_NAME_MAX_LEN",
message = "Account name is either too short or too long"
),
non_control_character(message = "Account name contains invalid characters")
// non_control_character(message = "Account name contains invalid characters")
)]
account_name: String,

Expand All @@ -205,7 +205,7 @@ pub mod post {
max = "VALIDATE_USER_EMAIL_MAX_LEN",
message = "Email is either too short or too long"
),
non_control_character(message = "Email contains invalid characters")
// non_control_character(message = "Email contains invalid characters")
)]
email: String,

Expand All @@ -220,7 +220,7 @@ pub mod post {
#[validate(
phone(message = "Phone is invalid"),
length(max = "VALIDATE_USER_PHONE_MAX_LEN", message = "Phone is too long"),
non_control_character(message = "Phone name contains invalid characters")
// non_control_character(message = "Phone name contains invalid characters")
)]
phone: Option<String>,

Expand All @@ -231,7 +231,7 @@ pub mod post {
max = "VALIDATE_USER_LANGUAGE_MAX_LEN",
message = "Language is too long"
),
non_control_character(message = "Language contains invalid characters")
// non_control_character(message = "Language contains invalid characters")
)]
language: Option<String>,

Expand Down
6 changes: 3 additions & 3 deletions rs/packages/api/src/routes/invitations/accept.rs
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ pub mod post {
max = "VALIDATE_USER_FIRST_NAME_MAX_LEN",
message = "First name is either too short or too long"
),
non_control_character(message = "First name contains invalid characters")
// non_control_character(message = "First name contains invalid characters")
)]
pub first_name: String,

Expand All @@ -72,7 +72,7 @@ pub mod post {
max = "VALIDATE_USER_LAST_NAME_MAX_LEN",
message = "Last name is either too short or too long"
),
non_control_character(message = "Last name contains invalid characters")
// non_control_character(message = "Last name contains invalid characters")
)]
pub last_name: String,

Expand All @@ -84,7 +84,7 @@ pub mod post {
max = "VALIDATE_USER_PHONE_MAX_LEN",
message = "Phone number is either too short or too long"
),
non_control_character(message = "Phone number contains invalid characters")
// non_control_character(message = "Phone number contains invalid characters")
)]
pub phone: Option<String>,

Expand Down
2 changes: 1 addition & 1 deletion rs/packages/api/src/routes/invitations/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,7 @@ pub mod post {
max = "VALIDATE_USER_EMAIL_MAX_LEN",
message = "Email is either too short or too long",
),
non_control_character(message = "Email contains invalid characters")
// non_control_character(message = "Email contains invalid characters")
)]
pub email: String,
}
Expand Down
2 changes: 1 addition & 1 deletion rs/packages/api/src/routes/me/api_keys/id.rs
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ pub mod patch {
max = "VALIDATE_ACCESS_TOKEN_TITLE_MAX_LEN",
message = "Title is either too short or too long"
),
non_control_character(message = "Title contains invalid characters")
// non_control_character(message = "Title contains invalid characters")
)]
title: Option<String>,
}
Expand Down
2 changes: 1 addition & 1 deletion rs/packages/api/src/routes/me/api_keys/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ pub mod post {
max = "VALIDATE_ACCESS_TOKEN_TITLE_MAX_LEN",
message = "API key title is either too short or too long",
),
non_control_character(message = "API key title contains invalid characters")
// non_control_character(message = "API key title contains invalid characters")
)]
title: String,
password: String,
Expand Down
6 changes: 3 additions & 3 deletions rs/packages/api/src/routes/plans/id.rs
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ pub mod patch {
max = "VALIDATE_PLAN_IDENTIFIER_MAX_LEN",
message = "Identifier is either too short or too long"
),
non_control_character(message = "Identifier contains invalid characters")
// non_control_character(message = "Identifier contains invalid characters")
)]
identifier: Option<String>,

Expand All @@ -217,7 +217,7 @@ pub mod patch {
max = "VALIDATE_PLAN_SLUG_MAX_LEN",
message = "Slug is either too short or too long"
),
non_control_character(message = "Slug contains invalid characters")
// non_control_character(message = "Slug contains invalid characters")
)]
slug: Option<String>,

Expand All @@ -229,7 +229,7 @@ pub mod patch {
max = "VALIDATE_PLAN_NAME_MAX_LEN",
message = "Display name is either too short or too long"
),
non_control_character(message = "Display name contains invalid characters")
// non_control_character(message = "Display name contains invalid characters")
)]
display_name: Option<String>,

Expand Down
6 changes: 3 additions & 3 deletions rs/packages/api/src/routes/plans/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ pub mod post {
max = "VALIDATE_PLAN_IDENTIFIER_MAX_LEN",
message = "Identifier is either too short or too long"
),
non_control_character(message = "Identifier contains invalid characters")
// non_control_character(message = "Identifier contains invalid characters")
)]
pub identifier: String,

Expand All @@ -161,7 +161,7 @@ pub mod post {
max = "VALIDATE_PLAN_SLUG_MAX_LEN",
message = "Slug is either too short or too long"
),
non_control_character(message = "Slug contains invalid characters")
// non_control_character(message = "Slug contains invalid characters")
)]
pub slug: String,

Expand All @@ -172,7 +172,7 @@ pub mod post {
max = "VALIDATE_PLAN_NAME_MAX_LEN",
message = "Display name is either too short or too long"
),
non_control_character(message = "Display name contains invalid characters")
// non_control_character(message = "Display name contains invalid characters")
)]
pub display_name: String,

Expand Down
12 changes: 6 additions & 6 deletions rs/packages/api/src/routes/stations/files/metadata.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ pub mod put {
max = "VALIDATE_AUDIO_FILE_METADATA_TITLE_MAX_LEN",
message = "Title is too long"
),
non_control_character(message = "Title contains invalid characters")
// non_control_character(message = "Title contains invalid characters")
)]
pub title: Option<Option<String>>,

Expand All @@ -61,7 +61,7 @@ pub mod put {
max = "VALIDATE_AUDIO_FILE_METADATA_ARTIST_MAX_LEN",
message = "Artist is too long"
),
non_control_character(message = "Artist contains invalid characters")
// non_control_character(message = "Artist contains invalid characters")
)]
pub artist: Option<Option<String>>,

Expand All @@ -77,7 +77,7 @@ pub mod put {
max = "VALIDATE_AUDIO_FILE_METADATA_ALBUM_MAX_LEN",
message = "Album is too long"
),
non_control_character(message = "Album contains invalid characters")
// non_control_character(message = "Album contains invalid characters")
)]
pub album: Option<Option<String>>,

Expand All @@ -93,7 +93,7 @@ pub mod put {
max = "VALIDATE_AUDIO_FILE_METADATA_ALBUM_ARTIST_MAX_LEN",
message = "Album artist is too long"
),
non_control_character(message = "Album artist contains invalid characters")
// non_control_character(message = "Album artist contains invalid characters")
)]
pub album_artist: Option<Option<String>>,

Expand All @@ -109,7 +109,7 @@ pub mod put {
max = "VALIDATE_AUDIO_FILE_METADATA_GENRE_MAX_LEN",
message = "Genre is too long"
),
non_control_character(message = "Genre contains invalid characters")
// non_control_character(message = "Genre contains invalid characters")
)]
pub genre: Option<Option<String>>,

Expand All @@ -133,7 +133,7 @@ pub mod put {
max = "VALIDATE_AUDIO_FILE_METADATA_COMMENT_MAX_LEN",
message = "Comment is too long"
),
non_control_character(message = "Comment contains invalid characters")
// non_control_character(message = "Comment contains invalid characters")
)]
pub comment: Option<Option<String>>,

Expand Down
Loading

0 comments on commit deb82d7

Please sign in to comment.