UploadFileForm.php 944 B

12345678910111213141516171819202122232425262728293031323334353637
  1. <?php
  2. namespace ghs\models\lakala;
  3. use ghs\models\BaseForm;
  4. /**
  5. * 拉卡拉资料图片上传表单模型
  6. */
  7. class UploadFileForm extends BaseForm
  8. {
  9. public $id;
  10. public $content;
  11. public $imgType;
  12. public $isOcr;
  13. public function rules()
  14. {
  15. return [
  16. [['id', 'content', 'imgType'], 'required', 'message' => '请填写{attribute}'],
  17. ['id', 'integer', 'min' => 1, 'message' => '申请ID格式错误', 'tooSmall' => '申请ID格式错误'],
  18. ['content', 'string'],
  19. ['imgType', 'string', 'max' => 64],
  20. ['isOcr', 'default', 'value' => 0],
  21. ['isOcr', 'boolean', 'message' => '是否OCR格式错误'],
  22. ];
  23. }
  24. public function attributeLabels()
  25. {
  26. return [
  27. 'id' => '申请ID',
  28. 'content' => '图片内容',
  29. 'imgType' => '图片类型',
  30. 'isOcr' => '是否OCR',
  31. ];
  32. }
  33. }