Use this tag if your question relates to the Yii2-validation-system, no matter if your validation is within a model or as standalaone validator-instances.
This tag is about the Yii2-validation-system. In most cases validators get used within models to validate their properties (rules()
-method). However, you can also use all the validators as standalone instances or create your own inline-validators.
The basic usage of Yii2's validators is very well documented in the corresponding section of the official guide.