I am using https://packagist.org/packages/bitdevelopment/yii2-validators
, a word count validation in Yii2, but I am getting
>PHP Parse Error – yii\base\ErrorException
syntax error, unexpected '-', expecting ',' or ';'
\bitdevelopment\yii2-validators\WordValidator;
How do I use this yii2
validator
?
You cannot use hypen(-) in namespace. As Class naming convention don't accept hypen, you have to use underscore. See the namespace convention here.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With