I am using :
[['avatar'], 'file', 'skipOnEmpty' => true, 'message'=>'png,jpg,jpeg files only', 'extensions' => 'png, jpg ,jpeg','on'=>'update']
It shows me validation message : "Only files with these extensions are allowed: png, jpg, jpeg." But i want validation message like: "png,jpg,jpeg files only". How can i do that ?
Use wrongExtension property:
[['avatar'], 'file', 'skipOnEmpty' => true, 'extensions' => 'png, jpg ,jpeg', 'wrongExtension'=>'{extensions} files only', 'on'=>'update']
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