# Function command::object::check_message_components

> A message's components: at most five action rows without `IS_COMPONENTS_V2`, the V2 layout kinds with it; at most 40 in all, unique `id`s and `custom_id`s.

`zaun_community_protocol::command::object::check_message_components` · Function

```rust
pub fn check_message_components(components: &[Component], v2: bool) -> Result<(), BodyError>
```

A message's components: at most five action rows without `IS_COMPONENTS_V2`, the V2
layout kinds with it; at most 40 in all, unique `id`s and `custom_id`s.

# Errors
`BAD_REQUEST` naming the field, or `PAYLOAD_TOO_LARGE` for a count or text over its limit.

[Full rustdoc page](/docs/api/rust/zaun-community-protocol/zaun_community_protocol/command/object/component/check/fn.check_message_components.html)
