您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

37 行
613B

  1. <?php
  2. namespace backend\forms;
  3. use yii\base\Model;
  4. use yii\web\UploadedFile;
  5. /**
  6. * UploadForm is the model behind the upload form.
  7. */
  8. class ProductPriceUploadForm extends Model
  9. {
  10. /**
  11. * @var UploadedFile file attribute
  12. */
  13. public $file;
  14. /**
  15. * @return array the validation rules.
  16. */
  17. public function rules()
  18. {
  19. return [
  20. [['file'], 'file', 'skipOnEmpty' => false, 'mimeTypes' => 'text/csv, text/plain'],
  21. ];
  22. }
  23. public function attributeLabels()
  24. {
  25. return [
  26. 'file' => "Fichier d'import (CSV)"
  27. ];
  28. }
  29. }
  30. ?>