# API Designer Collection Validation Incorrect with Body field value

**URL:** <https://community.postman.com/t/api-designer-collection-validation-incorrect-with-body-field-value/13609>\
**Category:** Help Hub\
**Created:** [June 23, 2020, 12:56pm UTC](https://community.postman.com/t/api-designer-collection-validation-incorrect-with-body-field-value/13609 "2020-06-23T12:56:51Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![darren.capner](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/darren.capner/32/4730_2.png) [@darren.capner](https://community.postman.com/u/darren.capner)\
**Post date:** [June 23, 2020, 3:28pm UTC](https://community.postman.com/t/api-designer-collection-validation-incorrect-with-body-field-value/13609/3 "2020-06-23T15:28:47Z")

</div>

Yes, you are right in that the request body attribute ‘username’ is not following pattern defined in API schema. I can change the value to a string with the right format and the validation passes. This is good.

The problem that I see when I set the ‘username’ JSON body attribute value to reference an Environment variable “{{USER\_NAME}}”. the validation fails with the same message. This issue has been reported in this post. [Collection Validation errors when request contains variables](https://community.postman.com/t/collection-validation-errors-when-request-contains-variables/13364)

Reset Password Request Body:

```
{
    "username": "{{USER_NAME}}",
    "oldPassword": "{{PASSWORD}}",
    "newPassword": "{{NEW_PASSWORD}}"
}

```

I click validate on the collection in the API Designer and receive this message.

 ![image](https://us1.discourse-cdn.com/getpostman/original/3X/4/2/4210b4a7335f881b6265d6535fbae69fbee7bcbc.png)

---

_[View the full topic](https://community.postman.com/t/api-designer-collection-validation-incorrect-with-body-field-value/13609)._
