# Validation does not fail when a parameter is used in two stages but is defined in the first one and is not defined in the second one

**URL:** <https://forum.reana.io/t/validation-does-not-fail-when-a-parameter-is-used-in-two-stages-but-is-defined-in-the-first-one-and-is-not-defined-in-the-second-one/41>\
**Category:** Uncategorized\
**Created:** [7 April 2021 13:44 UTC](https://forum.reana.io/t/validation-does-not-fail-when-a-parameter-is-used-in-two-stages-but-is-defined-in-the-first-one-and-is-not-defined-in-the-second-one/41 "2021-04-07T13:44:03Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ysmirnov](https://forum.reana.io/letter_avatar_proxy/v4/letter/y/3ec8ea/32.png) [@ysmirnov](https://forum.reana.io/u/ysmirnov)\
**Post date:** [7 April 2021 13:44 UTC](https://forum.reana.io/t/validation-does-not-fail-when-a-parameter-is-used-in-two-stages-but-is-defined-in-the-first-one-and-is-not-defined-in-the-second-one/41/1 "2021-04-07T13:44:03Z")

</div>

Hi,

suppose I define a parameter in `reana.yaml`:

```auto
  parameters:
    myPar: 900

```

and use it in the first stage of my `workflow.yaml`:

```auto
      parameters:
        myPar: {step: init, output: myPar}

```

Now, when I moved to the second stage of my workflow, I forgot that if I also want to use this `myPar` in my second stage, I have to define it there, too:

```auto
      parameters:
        myPar: {step: init, output: myPar}

```

Unfortunately, `reana-client validate` did not report any warnings about me using `{myPar}` in the second stage where it was not defined. And the job refused to run the second stage: it ran the first one, assigned the `failed` status to it and as far as I can see it never started processing the second stage. I have just spent an hour trying to debug this - would be great if the `reana-client validate` command could have caught it.
