# configValidationMode not work

**URL:** <https://forum.serverless.com/t/configvalidationmode-not-work/13163>\
**Category:** Serverless Framework\
**Created:** [November 19, 2020, 7:34pm UTC](https://forum.serverless.com/t/configvalidationmode-not-work/13163 "2020-11-19T19:34:40Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Fomin2402](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.serverless.com/fomin2402/32/4741_2.png) [@Fomin2402](https://forum.serverless.com/u/Fomin2402)\
**Post date:** [November 19, 2020, 7:34pm UTC](https://forum.serverless.com/t/configvalidationmode-not-work/13163/1 "2020-11-19T19:34:40Z")

</div>

When I add to my \*.yaml config file

```auto
...
configValidationMode: error
...

```

I expected that when \*.env file is missing some variable the command like

```auto
sls deploy

```

command will not be executed with some logs like

```auto
Hey, you are missing some variable!

```

my env:

```auto
Framework Core: 2.11.1 (local)
Plugin: 4.1.2
SDK: 2.3.2
Components: 3.3.1

```

my conf \*.yaml for example:

```auto
service: cognitotriggers

plugins:
  - serverless-webpack
  - serverless-plugin-aws-alerts

provider:
  name: aws
  endpointType: REGIONAL
  runtime: nodejs12.x
  region: us-east-2
  stage: ${opt:stage, 'dev'}
  environment:
    USER_POOL_ID: ${env:USER_POOL_ID}
  iamRoleStatements:
    - Effect: Allow
      Action:
        - s3:ListBucket
        - s3:GetObject
      Resource:
        - "arn:aws:s3:::some-s3-bucket

functions:
  presignup:
    handler: presignup.handler
    timeout: 10
    events:
      - cognitoUserPool:
          pool: ${self:custom.userPoolName}
          trigger: PreSignUp
          existing: true
  preauth:
    handler: preauth.handler
    timeout: 10
    events:
      - cognitoUserPool:
          pool: ${self:custom.userPoolName}
          trigger: PreAuthentication
          existing: true
  cognitoCustomMessage:
    handler: cognitocustommessage.handler
    timeout: 5
    events:
      - cognitoUserPool:
          pool: ${self:custom.userPoolName}
          trigger: CustomMessage
          existing: true
    environment:
      REDIRECT_URL: ${env:REDIRECT_URL}
      CONFIRM_URL: ${env:CONFIRM_URL}

configValidationMode: error

custom:
  accountId: "${env:AWS_ACCOUNT_ID}"
  userPoolName: "${env:userPoolName}"
  webpack: ${file(../../serverless/globals.yml):webpack}
  alerts: ${file(../../serverless/globals.yml):alerts}

```
