Skip to content

Failed to instantiate component or class "yii\insolita\ArrayStructureValidator". #3

@lloyd966

Description

@lloyd966

I am trying to use your Array Structure Validator. I installed it using composer and added the following code to my model:

use yii\insolita\ArrayStructureValidator;

['multiArray', ArrayStructureValidator::class,
'each' => true,
'rules' => [
'discipline_id' => [['required'], ['integer']],
'moc_id' => [['required'], ['integer']],
'foc_id' => [['required'], ['integer']],
'deliverable_id' => [['required'], ['integer']],
],
],

I get the error Failed to instantiate component or class "yii\insolita\ArrayStructureValidator"., when I try and run the create action.

Do I need to add any other code.

Do I need to add any code to my web.php config file, If so, can you provide me with code and where I need to add it.

Thank you

Lloyd

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions