# Command \`netlify build\` does not validate plugin inputs

**URL:** <https://answers.netlify.com/t/command-netlify-build-does-not-validate-plugin-inputs/12692>\
**Category:** Support\
**Tags:** building, deployment\
**Created:** [April 18, 2020, 3:34pm UTC](https://answers.netlify.com/t/command-netlify-build-does-not-validate-plugin-inputs/12692 "2020-04-18T15:34:56Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![hypervillain](https://sea1.discourse-cdn.com/netlify/user_avatar/answers.netlify.com/hypervillain/32/9371_2.png) [@hypervillain](https://answers.netlify.com/u/hypervillain)\
**Post date:** [April 18, 2020, 3:34pm UTC](https://answers.netlify.com/t/command-netlify-build-does-not-validate-plugin-inputs/12692/1 "2020-04-18T15:34:56Z")

</div>

Hey 👋

while working on [this build plugin](https://github.com/sw-yx/netlify-plugin-search-index), I ran into an `input "x" for plugin "./index.js"` error at deploy time, that I could not reproduce locally. It seems that when running `netlify build`, the build config passed to the plugin is not validated against the inputs list specified in the plugin `manifest.yml` file.

To reproduce, simply remove an input argument from the manifest and notice that `netlify build` still runs the plugin correctly.

Can you confirm?

In any case, it’s definitely not a big deal but this post will maybe help someone debugging ✌

---

<div class="post-metadata">

**Author:** ![ehmicky](https://sea1.discourse-cdn.com/netlify/user_avatar/answers.netlify.com/ehmicky/32/4051_2.png) [@ehmicky](https://answers.netlify.com/u/ehmicky)\
**Post date:** [April 21, 2020, 9:57am UTC](https://answers.netlify.com/t/command-netlify-build-does-not-validate-plugin-inputs/12692/2 "2020-04-21T09:57:02Z")

</div>

Hi @hypervillain,

Plugin `inputs` are optional by default. `required: true` can be used to make them required:

```auto
name: netlify-plugin-search-index
inputs:
  - name: generatedFunctionName
    required: true

```

Please let me know if I understood your question correctly.

---

<div class="post-metadata">

**Author:** ![hypervillain](https://sea1.discourse-cdn.com/netlify/user_avatar/answers.netlify.com/hypervillain/32/9371_2.png) [@hypervillain](https://answers.netlify.com/u/hypervillain)\
**Post date:** [April 21, 2020, 11:46am UTC](https://answers.netlify.com/t/command-netlify-build-does-not-validate-plugin-inputs/12692/3 "2020-04-21T11:46:58Z")

</div>

Eh Micky 👋

it’s not exactly the problem I encountered. None of the inputs defined there have a `required` property. My build rather failed on Netlify because it used an input that was not defined in my manifest. However, when running `netlify build` command, I was able to bundle my project locally.

If I understand correctly, the purpose of such build command is to mimic the behaviour of builds as they would happen remotely. At the moment, it seems it ignores the inputs declared in the manifest.

So, I’m reporting this to explain that the Netlify CLI (or its internal build package) maybe does not check required inputs, when ran locally. Hope it clears things up 😊

---

<div class="post-metadata">

**Author:** ![ehmicky](https://sea1.discourse-cdn.com/netlify/user_avatar/answers.netlify.com/ehmicky/32/4051_2.png) [@ehmicky](https://answers.netlify.com/u/ehmicky)\
**Post date:** [April 22, 2020, 10:41am UTC](https://answers.netlify.com/t/command-netlify-build-does-not-validate-plugin-inputs/12692/4 "2020-04-22T10:41:36Z")

</div>

Oh thanks for explaining, I did not understand it.

Just to make sure I totally understand it now: your plugin has a `manifest.yml`. When users are specifying an unknown input (for example mispeling the name of an input), it should throw an error. It does it in production builds, but not in Netlify CLI builds (`netlify build` command). Is that correct?

I this is the case, I think installing `netlify-cli@2.47.0` might solve your problem there. Please let me know.

---

<div class="post-metadata">

**Author:** ![hypervillain](https://sea1.discourse-cdn.com/netlify/user_avatar/answers.netlify.com/hypervillain/32/9371_2.png) [@hypervillain](https://answers.netlify.com/u/hypervillain)\
**Post date:** [April 23, 2020, 9:54pm UTC](https://answers.netlify.com/t/command-netlify-build-does-not-validate-plugin-inputs/12692/5 "2020-04-23T21:54:05Z")

</div>

Hello again @ehmicky,

yes, that was exactly my problem and updating the CLI solved it (plus a bunch of other minor bugs)!  
Thank you again for your time 👍
