validation.php 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. <?php
  2. return [
  3. 'array' => ':attribute格式不正确。',
  4. 'file' => ':attribute必须是文件。',
  5. 'image' => ':attribute必须是图片文件。',
  6. 'max' => [
  7. 'array' => ':attribute不能超过:max项。',
  8. 'file' => ':attribute不能大于:max KB。',
  9. 'numeric' => ':attribute不能大于:max。',
  10. 'string' => ':attribute不能超过:max个字符。',
  11. ],
  12. 'min' => [
  13. 'array' => ':attribute不能少于:min项。',
  14. 'file' => ':attribute不能小于:min KB。',
  15. 'numeric' => ':attribute不能小于:min。',
  16. 'string' => ':attribute不能少于:min个字符。',
  17. ],
  18. 'mimes' => ':attribute格式不支持,允许的格式有::values。',
  19. 'mimetypes' => ':attribute格式不支持,允许的类型有::values。',
  20. 'required' => '请填写:attribute。',
  21. 'uploaded' => ':attribute上传失败,请重试。',
  22. 'custom' => [
  23. 'photos' => [
  24. 'array' => '图片列表格式不正确,请重新选择图片。',
  25. ],
  26. 'photos.*' => [
  27. 'uploaded' => '图片上传失败(可能文件过大、上传中断或临时文件生成失败),请重试。',
  28. 'image' => '仅支持 JPG、PNG、WEBP 图片。',
  29. 'max' => '单张图片不能超过 10MB。',
  30. ],
  31. ],
  32. 'attributes' => [
  33. 'photos' => '图片列表',
  34. 'photos.*' => '图片',
  35. 'markdown_file' => 'Markdown 文件',
  36. 'original_markdown' => 'Markdown 内容',
  37. 'file_name' => '文件名(来源名称)',
  38. ],
  39. ];