yii2/bootstrap4/ActiveForm error

I’m having problem when I use the bootstrap4 activeform.
I am receiving this error

Undefined class constant ‘self::VALIDATION_STATE_ON_INPUT’

Kindly help guys. Thank you.

Would you please post versions of Yii 2 and Bootstrap4 package? Also a full stacktrace of the error would help.

Actually there is no need in stacktrace because error source is quite obvious. The constant is not defined.

$ grep -IR VALIDATION_STATE_ON_INPUT vendor/
vendor/yiisoft/yii2-bootstrap4/src/ActiveForm.php:    public $validationStateOn =     self::VALIDATION_STATE_ON_INPUT;
vendor/yiisoft/yii2-bootstrap4/src/ActiveField.php:                if ($this->form->validationStateOn === ActiveForm::VALIDATION_STATE_ON_INPUT) {

composer.json content:

{
    "name": "yiisoft/yii2-app-advanced",
    "description": "Yii 2 Advanced Project Template",
    "keywords": ["yii2", "framework", "advanced", "project template"],
    "homepage": "http://www.yiiframework.com/",
    "type": "project",
    "license": "BSD-3-Clause",
    "support": {
        "issues": "https://github.com/yiisoft/yii2/issues?state=open",
        "forum": "http://www.yiiframework.com/forum/",
        "wiki": "http://www.yiiframework.com/wiki/",
        "irc": "irc://irc.freenode.net/yii",
        "source": "https://github.com/yiisoft/yii2"
    },
    "minimum-stability": "stable",
    "require": {
        "php": ">=5.4.0",
        "yiisoft/yii2": "2.0.13",
        "intranetworks/common": "dev-master",
        "yiisoft/yii2-authclient": "^2.1",
        "yiisoft/yii2-mongodb": "^2.1",
        "sadovojav/yii2-image-cutter": "^1.0",
        "kartik-v/yii2-date-range": "^1.6",
        "kop/yii2-scroll-pager": "^2.5",
        "kartik-v/yii2-tree-manager": "@dev",
        "insolita/yii2-migration-generator": "~2.3",
        "kartik-v/yii2-widgets": "^3.4",
        "kossmoss/yii2-postgresql-array-field": "dev-master",
        "yiisoft/yii2-elasticsearch": "^2.0",
        "betsuno/yii2-yandex-money": "^0.1.0",
        "kartik-v/yii2-tabs-x": "1.2.6",
        "kartik-v/yii2-grid": "^3.1",
        "russ666/yii2-buttons-group-input": "dev-master",
        "karnbrockgmbh/yii2-modal-ajax": "^1.0",
        "loveorigami/yii2-modal-ajax": "^2.1",
        "tecnickcom/tcpdf": "dev-master",
        "kartik-v/yii2-checkbox-x": "*",
        "sc0vu/web3.php": "dev-master",
        "kartik-v/yii2-dynagrid": "@dev",
        "2amigos/yii2-ckeditor-widget": "^2.1",
        "devgroup/yii2-jsoneditor": "^1.1",
        "yiisoft/yii2-swiftmailer": "2.0.7",
        "kartik-v/yii2-builder": "^1.6",
        "kartik-v/yii2-editable": "^1.7",
        "kartik-v/yii2-nav-x": "*",
        "kartik-v/yii2-dropdown-x": "*",
        "2amigos/yii2-transliterator-helper": "^1.0",
        "himiklab/yii2-recaptcha-widget": "*",
        "aferrandini/phpqrcode": "^1.0",
        "rmrevin/yii2-fontawesome": "^3.0",
        "codemix/yii2-localeurls": "^1.7",
        "yiisoft/yii2-bootstrap4": "^2.0"
    },
    "require-dev": {
        "yiisoft/yii2-debug": "~2.0.0",
        "yiisoft/yii2-gii": "~2.0.0",
        "yiisoft/yii2-faker": "~2.0.0",
        "codeception/base": "^2.2.3",
        "codeception/verify": "~0.3.1"
    },
    "config": {
        "process-timeout": 1800,
        "fxp-asset": {
            "enabled": false
        },
        "secure-http": false
    },
    "repositories": [
        {
            "type": "composer",
            "url": "https://asset-packagist.org"
        },
        {
            "type": "vcs",
            "url": "git@git.dev.edrid.ru:edrid/common.git"
        }
    ]
}

It extends from \yii\widgets\ActiveForm that has such constant:

But as you can see there is no constant definition in vendor folder.

But it is there and we can see it. Apparently it is you, that don’t have it in the folder. Do you have yii2 folder there?