validation.php 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  1. <?php
  2. return array(
  3. /*
  4. |--------------------------------------------------------------------------
  5. | Validation Language Lines
  6. |--------------------------------------------------------------------------
  7. |
  8. | The following language lines contain the default error messages used
  9. | by the validator class. Some of the rules contain multiple versions,
  10. | such as the size (max, min, between) rules. These versions are used
  11. | for different input types such as strings and files.
  12. |
  13. | These language lines may be easily changed to provide custom error
  14. | messages in your application. Error messages for custom validation
  15. | rules may also be added to this file.
  16. |
  17. */
  18. "accepted" => "您必须同意 :attribute 才能继续.",
  19. "active_url" => "链接 :attribute 不合法.",
  20. "after" => " :attribute 时间必须晚于 :date.",
  21. "alpha" => "字段 :attribute 只能包含字母.",
  22. "alpha_dash" => "字段 :attribute 只能包含 字母, 数字, 中横线.",
  23. "alpha_num" => "字段 :attribute 只能包含 字母, 数字.",
  24. "array" => "字段 :attribute 必须选择.",
  25. "before" => " :attribute 日期必须早于 :date.",
  26. "between" => array(
  27. "numeric" => "数字 :attribute 必须大于 :min 且小于 :max.",
  28. "file" => "文件 :attribute 大小必须大于 :min 且小于 :max KB.",
  29. "string" => "字段 :attribute 长度必须大于 :min 且小于 :max .",
  30. ),
  31. "confirmed" => " :attribute 确认项不匹配.",
  32. "count" => " :attribute 必须只能包含 :count 项.",
  33. "countbetween" => " :attribute 至少要有 :min 项,最多 :max 项.",
  34. "countmax" => " :attribute 不能超过 :max 项.",
  35. "countmin" => " :attribute 至少要选择 :min 项.",
  36. "date_format" => " :attribute 不是合法的日期格式.",
  37. "different" => " :attribute 和 :other 不能一样.",
  38. "email" => " :attribute 不是合法的邮箱地址.",
  39. "exists" => " :attribute 不合法或不存在.",
  40. "image" => " :attribute 必须为图片类型.",
  41. "in" => " 选择的 :attribute 不正确.",
  42. "integer" => " :attribute 必须为整数.",
  43. "ip" => " :attribute 必须为合法的IP地址.",
  44. "match" => " :attribute 格式不正确.",
  45. "max" => array(
  46. "numeric" => "数字 :attribute 不能大于 :max.",
  47. "file" => "文件 :attribute 不能超过 :max KB.",
  48. "string" => "字段 :attribute 不能超过 :max 字符.",
  49. ),
  50. "mimes" => "文件 :attribute 只能为类型: :values.",
  51. "min" => array(
  52. "numeric" => "数字 :attribute 不能小于 :min.",
  53. "file" => "文件 :attribute 不能小于 :min KB.",
  54. "string" => "字段 :attribute 不能少于 :min 字符.",
  55. ),
  56. "not_in" => "选择的 :attribute 不正确.",
  57. "numeric" => " :attribute 必须的是数字.",
  58. "required" => " :attribute 不能为空.",
  59. "required_with" => "字段 :attribute field is required with :field",
  60. "same" => "The :attribute and :other must match.",
  61. "size" => array(
  62. "numeric" => "数字 :attribute 只能是 :size.",
  63. "file" => "文件 :attribute 只能是 :size KB.",
  64. "string" => "字段 :attribute 只能包含 :size 字符.",
  65. ),
  66. "unique" => ":attribute 已经被占用.",
  67. "url" => ":attribute 不合法.",
  68. /*
  69. |--------------------------------------------------------------------------
  70. | Custom Validation Language Lines
  71. |--------------------------------------------------------------------------
  72. |
  73. | Here you may specify custom validation messages for attributes using the
  74. | convention "attribute_rule" to name the lines. This helps keep your
  75. | custom validation clean and tidy.
  76. |
  77. | So, say you want to use a custom validation message when validating that
  78. | the "email" attribute is unique. Just add "email_unique" to this array
  79. | with your custom message. The Validator will handle the rest!
  80. |
  81. */
  82. 'custom' => array(),
  83. /*
  84. |--------------------------------------------------------------------------
  85. | Validation Attributes
  86. |--------------------------------------------------------------------------
  87. |
  88. | The following language lines are used to swap attribute place-holders
  89. | with something more reader friendly such as "E-Mail Address" instead
  90. | of "email". Your users will thank you.
  91. |
  92. | The Validator class will automatically search this array of lines it
  93. | is attempting to replace the :attribute place-holder in messages.
  94. | It's pretty slick. We think you'll like it.
  95. |
  96. */
  97. 'attributes' => array(),
  98. );