#Error Creating Modal with multiple Text Inputs

1 messages · Page 1 of 1 (latest)

foggy folio
#

Code:

let components = vec![Component::ActionRow(ActionRow {
    components: vec![
        twilight_model::channel::message::Component::TextInput(TextInput {
            custom_id: format!("verify-1-{}", 1),
            label: "some-text".to_string(),
            max_length: Some(1),
            min_length: Some(1),
            placeholder: Some("J/N".to_string()),
            required: Some(true),
            style: TextInputStyle::Short,
            value: None,
        }),
        twilight_model::channel::message::Component::TextInput(TextInput {
            custom_id: format!("verify-2-{}", 2),
            label: "some-text"
                .to_string(),
            max_length: Some(1),
            min_length: Some(1),
            placeholder: Some("J/N".to_string()),
            required: Some(true),
            style: TextInputStyle::Short,
            value: None,
        }),
    ],
})];

Error:
https://pastebin.com/tiSi6Rd1

#

why i get this error?

foggy folio
#

my mistake, the labels were too long...

but

now i got another error:
same rust code

Error:

body_string: "{\"code\": 50035, \"errors\": {\"data\": {\"components\": {\"0\": {\"components\": {\"1\": {\"_errors\": [{\"code\": \"COMPONENT_LAYOUT_WIDTH_EXCEEDED\", \"message\": \"The specified component exceeds the maximum width\"}]}}}}}}, \"message\": \"Invalid Form Body\"}"
rough star