You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

34 lines
552B

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