0
votes

I implemented a custom class validator "app\validators\TestValidator". In what place of the configuration file it is necessary to register to enable validation in the model? For example: ['field', 'test']. Thanks.

1

1 Answers

0
votes
['field', TestValidator::className()]

sure you should add USE to be able to autoload this validator in your app or

['field',app\validators\TestValidator::className()]