validation.php 4.7 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" => "The :attribute must be accepted.",
  19. "active_url" => "The :attribute is not a valid URL.",
  20. "after" => "The :attribute must be a date after :date.",
  21. "alpha" => "The :attribute may only contain letters.",
  22. "alpha_dash" => "The :attribute may only contain letters, numbers, and dashes.",
  23. "alpha_num" => "The :attribute may only contain letters and numbers.",
  24. "array" => "The :attribute must have selected elements.",
  25. "before" => "The :attribute must be a date before :date.",
  26. "between" => array(
  27. "numeric" => "The :attribute must be between :min - :max.",
  28. "file" => "The :attribute must be between :min - :max kilobytes.",
  29. "string" => "The :attribute must be between :min - :max characters.",
  30. ),
  31. "confirmed" => "The :attribute confirmation does not match.",
  32. "count" => "The :attribute must have exactly :count selected elements.",
  33. "countbetween" => "The :attribute must have between :min and :max selected elements.",
  34. "countmax" => "The :attribute must have less than :max selected elements.",
  35. "countmin" => "The :attribute must have at least :min selected elements.",
  36. "date_format" => "The :attribute must have a valid date format.",
  37. "different" => "The :attribute and :other must be different.",
  38. "email" => "The :attribute format is invalid.",
  39. "exists" => "The selected :attribute is invalid.",
  40. "image" => "The :attribute must be an image.",
  41. "in" => "The selected :attribute is invalid.",
  42. "integer" => "The :attribute must be an integer.",
  43. "ip" => "The :attribute must be a valid IP address.",
  44. "match" => "The :attribute format is invalid.",
  45. "max" => array(
  46. "numeric" => "The :attribute must be less than :max.",
  47. "file" => "The :attribute must be less than :max kilobytes.",
  48. "string" => "The :attribute must be less than :max characters.",
  49. ),
  50. "mimes" => "The :attribute must be a file of type: :values.",
  51. "min" => array(
  52. "numeric" => "The :attribute must be at least :min.",
  53. "file" => "The :attribute must be at least :min kilobytes.",
  54. "string" => "The :attribute must be at least :min characters.",
  55. ),
  56. "not_in" => "The selected :attribute is invalid.",
  57. "numeric" => "The :attribute must be a number.",
  58. "required" => "The :attribute field is required.",
  59. "required_with" => "The :attribute field is required with :field",
  60. "same" => "The :attribute and :other must match.",
  61. "size" => array(
  62. "numeric" => "The :attribute must be :size.",
  63. "file" => "The :attribute must be :size kilobyte.",
  64. "string" => "The :attribute must be :size characters.",
  65. ),
  66. "unique" => "The :attribute has already been taken.",
  67. "url" => "The :attribute format is invalid.",
  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. );