AliyunOcrForm.php 778 B

123456789101112131415161718192021222324252627282930313233
  1. <?php
  2. namespace hd\models\lakala;
  3. use hd\models\BaseForm;
  4. /**
  5. * 阿里云 OCR 识别表单模型
  6. */
  7. class AliyunOcrForm extends BaseForm
  8. {
  9. public $id;
  10. public $imgType;
  11. public $imageUrl;
  12. public function rules()
  13. {
  14. return [
  15. [['id', 'imgType', 'imageUrl'], 'required', 'message' => '请填写{attribute}'],
  16. ['id', 'integer', 'min' => 1, 'message' => '申请ID格式错误', 'tooSmall' => '申请ID格式错误'],
  17. ['imgType', 'string', 'max' => 64],
  18. ['imageUrl', 'string', 'max' => 1024],
  19. ];
  20. }
  21. public function attributeLabels()
  22. {
  23. return [
  24. 'id' => '申请ID',
  25. 'imgType' => '图片类型',
  26. 'imageUrl' => '图片地址',
  27. ];
  28. }
  29. }