validation.php 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  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. "alpha" => "The :attribute may only contain letters.",
  21. "alpha_dash" => "The :attribute may only contain letters, numbers, and dashes.",
  22. "alpha_num" => "The :attribute may only contain letters and numbers.",
  23. "between" => array(
  24. "numeric" => "The :attribute must be between :min - :max.",
  25. "file" => "The :attribute must be between :min - :max kilobytes.",
  26. "string" => "The :attribute must be between :min - :max characters.",
  27. ),
  28. "confirmed" => "The :attribute confirmation does not match.",
  29. "different" => "The :attribute and :other must be different.",
  30. "email" => "The :attribute format is invalid.",
  31. "exists" => "The selected :attribute is invalid.",
  32. "image" => "The :attribute must be an image.",
  33. "in" => "The selected :attribute is invalid.",
  34. "integer" => "The :attribute must be an integer.",
  35. "ip" => "The :attribute must be a valid IP address.",
  36. "max" => array(
  37. "numeric" => "The :attribute must be less than :max.",
  38. "file" => "The :attribute must be less than :max kilobytes.",
  39. "string" => "The :attribute must be less than :max characters.",
  40. ),
  41. "mimes" => "The :attribute must be a file of type: :values.",
  42. "min" => array(
  43. "numeric" => "The :attribute must be at least :min.",
  44. "file" => "The :attribute must be at least :min kilobytes.",
  45. "string" => "The :attribute must be at least :min characters.",
  46. ),
  47. "not_in" => "The selected :attribute is invalid.",
  48. "numeric" => "The :attribute must be a number.",
  49. "required" => "The :attribute field is required.",
  50. "same" => "The :attribute and :other must match.",
  51. "size" => array(
  52. "numeric" => "The :attribute must be :size.",
  53. "file" => "The :attribute must be :size kilobyte.",
  54. "string" => "The :attribute must be :size characters.",
  55. ),
  56. "unique" => "The :attribute has already been taken.",
  57. "url" => "The :attribute format is invalid.",
  58. /*
  59. |--------------------------------------------------------------------------
  60. | Custom Validation Language Lines
  61. |--------------------------------------------------------------------------
  62. |
  63. | Here you may specify custom validation messages for attributes using the
  64. | convention "attribute_rule" to name the lines. This helps keep your
  65. | custom validation clean and tidy.
  66. |
  67. | So, say you want to use a custom validation message when validating that
  68. | the "email" attribute is unique. Just add "email_unique" to this array
  69. | with your custom message. The Validator will handle the rest!
  70. |
  71. */
  72. 'custom' => array('custom_required' => 'This field is required!'),
  73. /*
  74. |--------------------------------------------------------------------------
  75. | Validation Attributes
  76. |--------------------------------------------------------------------------
  77. |
  78. | The following language lines are used to swap attribute place-holders
  79. | with something more reader friendly such as "E-Mail Address" instead
  80. | of "email". Your users will thank you.
  81. |
  82. | The Validator class will automatically search this array of lines it
  83. | is attempting to replace the :attribute place-holder in messages.
  84. | It's pretty slick. We think you'll like it.
  85. |
  86. */
  87. 'attributes' => array('test_attribute' => 'attribute'),
  88. );