# Limit integer values in a blueprint structure to a range

**URL:** <https://forums.unrealengine.com/t/limit-integer-values-in-a-blueprint-structure-to-a-range/789224>\
**Category:** Programming & Scripting\
**Tags:** Struct, Structure, integer, unreal-engine, Blueprint, question\
**Created:** [March 12, 2023, 7:24pm UTC](https://forums.unrealengine.com/t/limit-integer-values-in-a-blueprint-structure-to-a-range/789224 "2023-03-12T19:24:33Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tbunreal](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Tbunreal](https://forums.unrealengine.com/u/Tbunreal)\
**Post date:** [March 12, 2023, 7:24pm UTC](https://forums.unrealengine.com/t/limit-integer-values-in-a-blueprint-structure-to-a-range/789224/1 "2023-03-12T19:24:33Z")

</div>

Hi, say I have a structure created through blueprints and it holds a bunch of integers, but I only want the values to be able to be set from 0 to 50, how would I do that? Or at least throw some error if outside the range. Is it possible to do that from within the structure itself, or do I have to add extra validations where I would be setting it in my blueprint? I _want_ to be able to in the structure itself.

---

<div class="post-metadata">

**Author:** ![ClockworkOcean](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/clockworkocean/32/1169999_2.png) [@ClockworkOcean](https://forums.unrealengine.com/u/ClockworkOcean)\
**Post date:** [March 12, 2023, 7:48pm UTC](https://forums.unrealengine.com/t/limit-integer-values-in-a-blueprint-structure-to-a-range/789224/2 "2023-03-12T19:48:51Z")

</div>

There’s no code in the structure, you need to clamp them when you set them.

---

<div class="post-metadata">

**Author:** ![Tbunreal](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Tbunreal](https://forums.unrealengine.com/u/Tbunreal)\
**Post date:** [March 12, 2023, 7:57pm UTC](https://forums.unrealengine.com/t/limit-integer-values-in-a-blueprint-structure-to-a-range/789224/3 "2023-03-12T19:57:35Z")

</div>

OK, thank you.
