# Property length should be within the range 1000- 100000

**URL:** <https://community.postman.com/t/property-length-should-be-within-the-range-1000-100000/27780>\
**Category:** Help Hub\
**Tags:** tests\
**Created:** [September 13, 2021, 12:33pm UTC](https://community.postman.com/t/property-length-should-be-within-the-range-1000-100000/27780 "2021-09-13T12:33:11Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Badgujjar](https://avatars.discourse-cdn.com/v4/letter/b/c4cdca/32.png) [@Badgujjar](https://community.postman.com/u/Badgujjar)\
**Post date:** [September 13, 2021, 12:33pm UTC](https://community.postman.com/t/property-length-should-be-within-the-range-1000-100000/27780/1 "2021-09-13T12:33:11Z")

</div>

i am having object properties , in that i have one property id , so i need to check in my testcase id should be within range 1000-100000 . how can i write test case for that.

 ![image](https://us1.discourse-cdn.com/getpostman/original/2X/9/92adfef9335f8548c4260be1adfe3c53ea761386.png)

_How I found the problem_:

_I’ve already tried_:

---

<div class="post-metadata">

**Author:** ![bpricilla](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/bpricilla/32/6511_2.png) [@bpricilla](https://community.postman.com/u/bpricilla)\
**Post date:** [September 13, 2021, 1:26pm UTC](https://community.postman.com/t/property-length-should-be-within-the-range-1000-100000/27780/2 "2021-09-13T13:26:31Z")

</div>

@Badgujjar Welcome to the community 🥳

You can use something like:

```auto
pm.test("Test Case ID validation", function () {
     pm.expect(resp.id).to.be.above(1000);
     pm.expect(resp.id).to.be.below(100000);
});

```

Or if you are familiar with Lodash libraries try [this](https://lodash.com/docs/4.17.15#inRange).

---

<div class="post-metadata">

**Author:** ![Badgujjar](https://avatars.discourse-cdn.com/v4/letter/b/c4cdca/32.png) [@Badgujjar](https://community.postman.com/u/Badgujjar)\
**Post date:** [September 13, 2021, 2:51pm UTC](https://community.postman.com/t/property-length-should-be-within-the-range-1000-100000/27780/3 "2021-09-13T14:51:43Z")

</div>

Thanks for help, but I already new this method but dnt want to use this above and below. Can I do it in single go?
