fix: update message length validation to remove upper limit (#723)
Signed-off-by: ispik <ispik@ispik.dev>
This commit is contained in:
@@ -261,7 +261,7 @@ auto_derived!(
|
|||||||
pub nonce: Option<String>,
|
pub nonce: Option<String>,
|
||||||
|
|
||||||
/// Message content to send
|
/// Message content to send
|
||||||
#[cfg_attr(feature = "validator", validate(length(min = 0, max = 2000)))]
|
#[cfg_attr(feature = "validator", validate(length(min = 0)))]
|
||||||
pub content: Option<String>,
|
pub content: Option<String>,
|
||||||
/// Attachments to include in message
|
/// Attachments to include in message
|
||||||
pub attachments: Option<Vec<String>>,
|
pub attachments: Option<Vec<String>>,
|
||||||
@@ -345,7 +345,7 @@ auto_derived!(
|
|||||||
#[cfg_attr(feature = "validator", derive(Validate))]
|
#[cfg_attr(feature = "validator", derive(Validate))]
|
||||||
pub struct DataEditMessage {
|
pub struct DataEditMessage {
|
||||||
/// New message content
|
/// New message content
|
||||||
#[cfg_attr(feature = "validator", validate(length(min = 1, max = 2000)))]
|
#[cfg_attr(feature = "validator", validate(length(min = 1)))]
|
||||||
pub content: Option<String>,
|
pub content: Option<String>,
|
||||||
/// Embeds to include in the message
|
/// Embeds to include in the message
|
||||||
#[cfg_attr(feature = "validator", validate(length(min = 0, max = 10)))]
|
#[cfg_attr(feature = "validator", validate(length(min = 0, max = 10)))]
|
||||||
|
|||||||
Reference in New Issue
Block a user