# Config workflow validation error

**URL:** <https://discuss.circleci.com/t/config-workflow-validation-error/30652>\
**Category:** Build Environment\
**Tags:** workflow, circle-yml\
**Created:** [May 31, 2019, 10:47am UTC](https://discuss.circleci.com/t/config-workflow-validation-error/30652 "2019-05-31T10:47:59Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![macintosh](https://avatars.discourse-cdn.com/v4/letter/m/858c86/32.png) [@macintosh](https://discuss.circleci.com/u/macintosh)\
**Post date:** [May 31, 2019, 10:48am UTC](https://discuss.circleci.com/t/config-workflow-validation-error/30652/1 "2019-05-31T10:48:00Z")

</div>

I am new to CircleCi and worked a lot on my config the last days.  
Now I changed my workflow, so that it should only run when my git commit is tagged with “build”. And if the “test” succeeds the “deploy” job should run.

```
workflows:
  version: 2
  build-and-deploy:
    jobs:
      - test:
        filters:
          tags:
            only: build
      - deploy:
        requires:
          - test

```

When I validate the config locally or run it only I get the following error:

> ERROR IN CONFIG FILE:  
> [#/workflows/build-and-deploy/jobs/1] 0 subschemas matched instead of one  
> 1. [#/workflows/build-and-deploy/jobs/1] expected type: String, found: Mapping  
> | SCHEMA:  
> | type: string  
> | INPUT:  
> | deploy: null  
> | requires:  
> | - test  
> | filters:  
> | branches:  
> | only: master  
> 2. [#/workflows/build-and-deploy/jobs/1] 2 schema violations found  
> | 1. [#/workflows/build-and-deploy/jobs/1] maximum size: [1], found: [2]  
> | | SCHEMA:  
> | | maxProperties: 1  
> | | INPUT:  
> | | deploy: null  
> | | requires:  
> | | - test  
> | | filters:  
> | | branches:  
> | | only: master  
> | 2. [#/workflows/build-and-deploy/jobs/1/requires] expected type: Mapping, found: Sequence  
> | | SCHEMA:  
> | | type: object  
> | | INPUT:  
> | | - test

Could anyone help me what I am missing here?

---

<div class="post-metadata">

**Author:** ![drazisil](https://sea2.discourse-cdn.com/circleci/user_avatar/discuss.circleci.com/drazisil/32/24029_2.png) [@drazisil](https://discuss.circleci.com/u/drazisil)\
**Post date:** [June 5, 2019, 2:48pm UTC](https://discuss.circleci.com/t/config-workflow-validation-error/30652/2 "2019-06-05T14:48:38Z")

</div>

I think `filters:` and `requires:` need to be indented, unless that’s based on how you pasted them here.

---

<div class="post-metadata">

**Author:** ![macintosh](https://avatars.discourse-cdn.com/v4/letter/m/858c86/32.png) [@macintosh](https://discuss.circleci.com/u/macintosh)\
**Post date:** [June 6, 2019, 9:27pm UTC](https://discuss.circleci.com/t/config-workflow-validation-error/30652/3 "2019-06-06T21:27:16Z")

</div>

Thanks for the help. That fixed it for me. Must have overlooked that, but strange that YAML validators accepted the config.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/circleci/original/3X/5/1/511608acda8e85906e15909b57bd0a46c1dbe291.png) [@system](https://discuss.circleci.com/u/system)\
**Post date:** [June 16, 2019, 9:27pm UTC](https://discuss.circleci.com/t/config-workflow-validation-error/30652/4 "2019-06-16T21:27:20Z")

</div>

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