# Limit the size of a number

**URL:** <https://community.hivepress.io/t/limit-the-size-of-a-number/5930>\
**Category:** Marketplace\
**Tags:** marketplace, requests\
**Created:** [May 21, 2023, 2:20pm UTC](https://community.hivepress.io/t/limit-the-size-of-a-number/5930 "2023-05-21T14:20:44Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![d-randm](https://community.hivepress.io/letter_avatar_proxy/v4/letter/d/6a8cbe/32.png) [@d-randm](https://community.hivepress.io/u/d-randm)\
**Post date:** [May 21, 2023, 2:20pm UTC](https://community.hivepress.io/t/limit-the-size-of-a-number/5930/1 "2023-05-21T14:20:44Z")

</div>

Hello,

On a Request I have a field called Budget, it seems to be a HP value.

And I want to limit the maximum number a user can input are 6 digit, or the maximum number 999.999 €

How can I do that?

Regards,  
Bernardo Barradas

---

<div class="post-metadata">

**Author:** ![andrii](https://community.hivepress.io/user_avatar/community.hivepress.io/andrii/32/2951_2.png) [@andrii](https://community.hivepress.io/u/andrii)\
**Post date:** [May 22, 2023, 7:51am UTC](https://community.hivepress.io/t/limit-the-size-of-a-number/5930/2 "2023-05-22T07:51:56Z")

</div>

Hi,

Please use this PHP snippet:

> **[How to add custom code snippets - HivePress Help Center](https://help.hivepress.io/article/23-how-to-add-custom-code-snippets)**
>
> Adding PHP snippets Please try using the Code Snippets plugin for adding and managing custom PHP code snippets. Adding CSS snippets You can add custom CSS snipp

```auto
add_filter(
	'hivepress/v1/forms/request_update',
	function($args, $form){
		
		$args['fields']['budget']['max_value'] = 999.99;
		
		return $args;
	},
	1000,
	2
);

```

Please note that it can require further customization.

---

<div class="post-metadata">

**Author:** ![system](https://community.hivepress.io/user_avatar/community.hivepress.io/system/32/13990_2.png) [@system](https://community.hivepress.io/u/system)\
**Post date:** [June 21, 2023, 7:52am UTC](https://community.hivepress.io/t/limit-the-size-of-a-number/5930/3 "2023-06-21T07:52:01Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
