# Edit Validate IsInteger thowing error when more than 10 digits are entered in a field

**URL:** <https://forums.pega.com/t/edit-validate-isinteger-thowing-error-when-more-than-10-digits-are-entered-in-a-field/3524>\
**Category:** User Experience\
**Tags:** financial-services, 8-6, user-experience, pega-platform, senior-system-architect, case-management\
**Created:** [November 17, 2022, 5:42pm UTC](https://forums.pega.com/t/edit-validate-isinteger-thowing-error-when-more-than-10-digits-are-entered-in-a-field/3524 "2022-11-17T17:42:50Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![PritamK17522585](https://avatars.discourse-cdn.com/v4/letter/p/76d3ee/32.png) [@PritamK17522585](https://forums.pega.com/u/PritamK17522585)\
**Post date:** [November 17, 2022, 5:42pm UTC](https://forums.pega.com/t/edit-validate-isinteger-thowing-error-when-more-than-10-digits-are-entered-in-a-field/3524/1 "2022-11-17T17:42:50Z")

</div>

My Requirement is:

1. User should be able to enter only integer values with thousand separator and upto 10 digits and it should be client side validation.

Issue Context:

I have a decimal type property and cell type is also decimal. I have configured thousand separator in cell properties but there is no max characters option in cell properties. In DB table the datatype is set to decimal(10,0). This is existing configuration and hence system will save upto 10 digits only in DB table. Submitting more than 10 digits gives commit error and now we need to show a custom error message.

I have configured IsInteger Edit Validate rule in the property. This makes sure that user cannot enter decimals. Hence, thousand separator and not allowing decimals is taken care of. However, In the UI when I enter 10 digits, Edit validate “IsInteger” rule throws an error, rather it should allow me to enter 10 digits.

I think I have to write a custom edit validate rule which will validate the length and also validate whether its integer. Need inputs on how to achieve this way or some other way is also fine.

---

<div class="post-metadata">

**Author:** ![mrits1](https://yyz2.discourse-cdn.com/pega/user_avatar/forums.pega.com/mrits1/32/12113_2.png) [@mrits1](https://forums.pega.com/u/mrits1)\
**Post date:** [November 18, 2022, 8:59am UTC](https://forums.pega.com/t/edit-validate-isinteger-thowing-error-when-more-than-10-digits-are-entered-in-a-field/3524/2 "2022-11-18T08:59:32Z")

</div>

@PritamK0 Hi, In the UI field presentation tab there is editable settings under which you can mention the max and min characters. Can you try configuring that, this setting restricts user from entering more than the mentioned characters. PFB. Please see if it helps.

 ![edit.png](https://pega1.discourse-cdn.com/pega/original/2X/6/689e0f2a515170af29b12d5893f781f28d318d7c.png)

---

<div class="post-metadata">

**Author:** ![archana\_p](https://avatars.discourse-cdn.com/v4/letter/a/e47774/32.png) [@archana\_p](https://forums.pega.com/u/archana_p)\
**Post date:** [November 18, 2022, 3:29pm UTC](https://forums.pega.com/t/edit-validate-isinteger-thowing-error-when-more-than-10-digits-are-entered-in-a-field/3524/3 "2022-11-18T15:29:46Z")

</div>

@PritamK0 : The maximum value of integer supported by Java is 2147483647 (2^31-1). If you are entering value greater than this, IsInteger Rule-Edit-Validate will report error as not a valid Integer.

---

<div class="post-metadata">

**Author:** ![PritamK17522585](https://avatars.discourse-cdn.com/v4/letter/p/76d3ee/32.png) [@PritamK17522585](https://forums.pega.com/u/PritamK17522585)\
**Post date:** [January 20, 2023, 11:50am UTC](https://forums.pega.com/t/edit-validate-isinteger-thowing-error-when-more-than-10-digits-are-entered-in-a-field/3524/4 "2023-01-20T11:50:31Z")

</div>

@SrinidhiM Issue is resolved. We tried with a different approach.

---

<div class="post-metadata">

**Author:** ![mrits1](https://yyz2.discourse-cdn.com/pega/user_avatar/forums.pega.com/mrits1/32/12113_2.png) [@mrits1](https://forums.pega.com/u/mrits1)\
**Post date:** [January 20, 2023, 3:52pm UTC](https://forums.pega.com/t/edit-validate-isinteger-thowing-error-when-more-than-10-digits-are-entered-in-a-field/3524/5 "2023-01-20T15:52:28Z")

</div>

@PritamK0 Can you please post the solution as well
