Let's initially understand basic types of custom validators:
Inline Validator
Standalone Validator
Inline Validator:
It is the type of the validator we create inside the class which is basically a method we define just like other methods but with extra parameters which is passed in by Yii2.
...