2013-01-11 15:14:07 -06:00
|
|
|
<?php
|
|
|
|
|
|
2014-08-28 13:15:07 +03:00
|
|
|
return [
|
2013-01-11 15:14:07 -06:00
|
|
|
|
2015-02-22 20:47:03 -06:00
|
|
|
/*
|
|
|
|
|
|--------------------------------------------------------------------------
|
|
|
|
|
| Validation Language Lines
|
|
|
|
|
|--------------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
|
|
| The following language lines contain the default error messages used by
|
|
|
|
|
| the validator class. Some of these rules have multiple versions such
|
|
|
|
|
| as the size rules. Feel free to tweak each of these messages here.
|
|
|
|
|
|
|
|
|
|
|
*/
|
2013-01-11 15:14:07 -06:00
|
|
|
|
2018-10-22 19:07:32 +01:00
|
|
|
'accepted' => 'The :attribute must be accepted.',
|
2021-08-05 10:45:48 -03:00
|
|
|
'accepted_if' => 'The :attribute must be accepted when :other is :value.',
|
2018-10-22 19:07:32 +01:00
|
|
|
'active_url' => 'The :attribute is not a valid URL.',
|
|
|
|
|
'after' => 'The :attribute must be a date after :date.',
|
|
|
|
|
'after_or_equal' => 'The :attribute must be a date after or equal to :date.',
|
Standarise "must" and "may" language in validation (#5552)
Majority of the messages are in the format ":attribute must
{conditions_to_be_met}", however a few inconsistently use "may" instead
of "must".
This PR fixes that and has them all use "must" instead.
To highlight the inconsistency:
```php
// "may"
'max' => [
'numeric' => 'The :attribute may not be greater than :max.',
'file' => 'The :attribute may not be greater than :max kilobytes.',
'string' => 'The :attribute may not be greater than :max characters.',
'array' => 'The :attribute may not have more than :max items.',
],
// "must"
'min' => [
'numeric' => 'The :attribute must be at least :min.',
'file' => 'The :attribute must be at least :min kilobytes.',
'string' => 'The :attribute must be at least :min characters.',
'array' => 'The :attribute must have at least :min items.',
],
```
2021-03-10 00:23:56 +11:00
|
|
|
'alpha' => 'The :attribute must only contain letters.',
|
|
|
|
|
'alpha_dash' => 'The :attribute must only contain letters, numbers, dashes and underscores.',
|
|
|
|
|
'alpha_num' => 'The :attribute must only contain letters and numbers.',
|
2018-10-22 19:07:32 +01:00
|
|
|
'array' => 'The :attribute must be an array.',
|
|
|
|
|
'before' => 'The :attribute must be a date before :date.',
|
|
|
|
|
'before_or_equal' => 'The :attribute must be a date before or equal to :date.',
|
|
|
|
|
'between' => [
|
2022-02-14 23:20:49 +06:00
|
|
|
'array' => 'The :attribute must have between :min and :max items.',
|
2018-10-22 19:07:32 +01:00
|
|
|
'file' => 'The :attribute must be between :min and :max kilobytes.',
|
2022-02-14 23:20:49 +06:00
|
|
|
'numeric' => 'The :attribute must be between :min and :max.',
|
2018-10-22 19:07:32 +01:00
|
|
|
'string' => 'The :attribute must be between :min and :max characters.',
|
2015-02-22 20:47:03 -06:00
|
|
|
],
|
2018-10-22 19:07:32 +01:00
|
|
|
'boolean' => 'The :attribute field must be true or false.',
|
|
|
|
|
'confirmed' => 'The :attribute confirmation does not match.',
|
2021-06-13 17:46:57 +02:00
|
|
|
'current_password' => 'The password is incorrect.',
|
2018-10-22 19:07:32 +01:00
|
|
|
'date' => 'The :attribute is not a valid date.',
|
2018-11-21 21:38:35 +01:00
|
|
|
'date_equals' => 'The :attribute must be a date equal to :date.',
|
2018-10-22 19:07:32 +01:00
|
|
|
'date_format' => 'The :attribute does not match the format :format.',
|
2021-11-11 15:20:34 +01:00
|
|
|
'declined' => 'The :attribute must be declined.',
|
|
|
|
|
'declined_if' => 'The :attribute must be declined when :other is :value.',
|
2018-10-22 19:07:32 +01:00
|
|
|
'different' => 'The :attribute and :other must be different.',
|
|
|
|
|
'digits' => 'The :attribute must be :digits digits.',
|
|
|
|
|
'digits_between' => 'The :attribute must be between :min and :max digits.',
|
|
|
|
|
'dimensions' => 'The :attribute has invalid image dimensions.',
|
|
|
|
|
'distinct' => 'The :attribute field has a duplicate value.',
|
2022-08-03 15:42:10 +02:00
|
|
|
'doesnt_end_with' => 'The :attribute may not end with one of the following: :values.',
|
2022-06-07 20:45:24 +04:30
|
|
|
'doesnt_start_with' => 'The :attribute may not start with one of the following: :values.',
|
2018-10-22 19:07:32 +01:00
|
|
|
'email' => 'The :attribute must be a valid email address.',
|
2020-01-12 16:06:29 +01:00
|
|
|
'ends_with' => 'The :attribute must end with one of the following: :values.',
|
2021-12-17 15:40:10 +01:00
|
|
|
'enum' => 'The selected :attribute is invalid.',
|
2018-10-22 19:07:32 +01:00
|
|
|
'exists' => 'The selected :attribute is invalid.',
|
|
|
|
|
'file' => 'The :attribute must be a file.',
|
|
|
|
|
'filled' => 'The :attribute field must have a value.',
|
|
|
|
|
'gt' => [
|
2022-02-14 23:20:49 +06:00
|
|
|
'array' => 'The :attribute must have more than :value items.',
|
2018-10-22 19:07:32 +01:00
|
|
|
'file' => 'The :attribute must be greater than :value kilobytes.',
|
2022-02-14 23:20:49 +06:00
|
|
|
'numeric' => 'The :attribute must be greater than :value.',
|
2018-10-22 19:07:32 +01:00
|
|
|
'string' => 'The :attribute must be greater than :value characters.',
|
2018-05-06 17:54:33 +03:00
|
|
|
],
|
2018-10-22 19:07:32 +01:00
|
|
|
'gte' => [
|
2022-02-14 23:20:49 +06:00
|
|
|
'array' => 'The :attribute must have :value items or more.',
|
2021-09-29 16:29:27 -04:00
|
|
|
'file' => 'The :attribute must be greater than or equal to :value kilobytes.',
|
2022-02-14 23:20:49 +06:00
|
|
|
'numeric' => 'The :attribute must be greater than or equal to :value.',
|
2021-09-29 16:29:27 -04:00
|
|
|
'string' => 'The :attribute must be greater than or equal to :value characters.',
|
2018-05-06 17:54:33 +03:00
|
|
|
],
|
2018-10-22 19:07:32 +01:00
|
|
|
'image' => 'The :attribute must be an image.',
|
|
|
|
|
'in' => 'The selected :attribute is invalid.',
|
|
|
|
|
'in_array' => 'The :attribute field does not exist in :other.',
|
|
|
|
|
'integer' => 'The :attribute must be an integer.',
|
|
|
|
|
'ip' => 'The :attribute must be a valid IP address.',
|
|
|
|
|
'ipv4' => 'The :attribute must be a valid IPv4 address.',
|
|
|
|
|
'ipv6' => 'The :attribute must be a valid IPv6 address.',
|
|
|
|
|
'json' => 'The :attribute must be a valid JSON string.',
|
|
|
|
|
'lt' => [
|
2022-02-14 23:20:49 +06:00
|
|
|
'array' => 'The :attribute must have less than :value items.',
|
2018-10-22 19:07:32 +01:00
|
|
|
'file' => 'The :attribute must be less than :value kilobytes.',
|
2022-02-14 23:20:49 +06:00
|
|
|
'numeric' => 'The :attribute must be less than :value.',
|
2018-10-22 19:07:32 +01:00
|
|
|
'string' => 'The :attribute must be less than :value characters.',
|
2018-05-08 15:58:10 +02:00
|
|
|
],
|
2018-10-22 19:07:32 +01:00
|
|
|
'lte' => [
|
2022-02-14 23:20:49 +06:00
|
|
|
'array' => 'The :attribute must not have more than :value items.',
|
2021-09-29 16:29:27 -04:00
|
|
|
'file' => 'The :attribute must be less than or equal to :value kilobytes.',
|
2022-02-14 23:20:49 +06:00
|
|
|
'numeric' => 'The :attribute must be less than or equal to :value.',
|
2021-09-29 16:29:27 -04:00
|
|
|
'string' => 'The :attribute must be less than or equal to :value characters.',
|
2018-05-08 15:58:10 +02:00
|
|
|
],
|
2022-02-02 22:57:23 -03:00
|
|
|
'mac_address' => 'The :attribute must be a valid MAC address.',
|
2018-10-22 19:07:32 +01:00
|
|
|
'max' => [
|
2022-02-14 23:20:49 +06:00
|
|
|
'array' => 'The :attribute must not have more than :max items.',
|
Standarise "must" and "may" language in validation (#5552)
Majority of the messages are in the format ":attribute must
{conditions_to_be_met}", however a few inconsistently use "may" instead
of "must".
This PR fixes that and has them all use "must" instead.
To highlight the inconsistency:
```php
// "may"
'max' => [
'numeric' => 'The :attribute may not be greater than :max.',
'file' => 'The :attribute may not be greater than :max kilobytes.',
'string' => 'The :attribute may not be greater than :max characters.',
'array' => 'The :attribute may not have more than :max items.',
],
// "must"
'min' => [
'numeric' => 'The :attribute must be at least :min.',
'file' => 'The :attribute must be at least :min kilobytes.',
'string' => 'The :attribute must be at least :min characters.',
'array' => 'The :attribute must have at least :min items.',
],
```
2021-03-10 00:23:56 +11:00
|
|
|
'file' => 'The :attribute must not be greater than :max kilobytes.',
|
2022-02-14 23:20:49 +06:00
|
|
|
'numeric' => 'The :attribute must not be greater than :max.',
|
Standarise "must" and "may" language in validation (#5552)
Majority of the messages are in the format ":attribute must
{conditions_to_be_met}", however a few inconsistently use "may" instead
of "must".
This PR fixes that and has them all use "must" instead.
To highlight the inconsistency:
```php
// "may"
'max' => [
'numeric' => 'The :attribute may not be greater than :max.',
'file' => 'The :attribute may not be greater than :max kilobytes.',
'string' => 'The :attribute may not be greater than :max characters.',
'array' => 'The :attribute may not have more than :max items.',
],
// "must"
'min' => [
'numeric' => 'The :attribute must be at least :min.',
'file' => 'The :attribute must be at least :min kilobytes.',
'string' => 'The :attribute must be at least :min characters.',
'array' => 'The :attribute must have at least :min items.',
],
```
2021-03-10 00:23:56 +11:00
|
|
|
'string' => 'The :attribute must not be greater than :max characters.',
|
2015-02-22 20:47:03 -06:00
|
|
|
],
|
2022-08-22 14:26:36 +01:00
|
|
|
'max_digits' => 'The :attribute must not have more than :max digits.',
|
2018-10-22 19:07:32 +01:00
|
|
|
'mimes' => 'The :attribute must be a file of type: :values.',
|
|
|
|
|
'mimetypes' => 'The :attribute must be a file of type: :values.',
|
|
|
|
|
'min' => [
|
2022-02-14 23:20:49 +06:00
|
|
|
'array' => 'The :attribute must have at least :min items.',
|
2018-10-22 19:07:32 +01:00
|
|
|
'file' => 'The :attribute must be at least :min kilobytes.',
|
2022-02-14 23:20:49 +06:00
|
|
|
'numeric' => 'The :attribute must be at least :min.',
|
2018-10-22 19:07:32 +01:00
|
|
|
'string' => 'The :attribute must be at least :min characters.',
|
2015-02-22 20:47:03 -06:00
|
|
|
],
|
2022-08-22 14:26:36 +01:00
|
|
|
'min_digits' => 'The :attribute must have at least :min digits.',
|
2021-01-14 23:27:55 +01:00
|
|
|
'multiple_of' => 'The :attribute must be a multiple of :value.',
|
2018-10-22 19:07:32 +01:00
|
|
|
'not_in' => 'The selected :attribute is invalid.',
|
|
|
|
|
'not_regex' => 'The :attribute format is invalid.',
|
|
|
|
|
'numeric' => 'The :attribute must be a number.',
|
2022-04-20 09:16:59 -05:00
|
|
|
'password' => [
|
|
|
|
|
'letters' => 'The :attribute must contain at least one letter.',
|
2022-04-28 15:08:50 +02:00
|
|
|
'mixed' => 'The :attribute must contain at least one uppercase and one lowercase letter.',
|
2022-04-20 09:16:59 -05:00
|
|
|
'numbers' => 'The :attribute must contain at least one number.',
|
2022-04-28 15:08:50 +02:00
|
|
|
'symbols' => 'The :attribute must contain at least one symbol.',
|
2022-04-20 09:16:59 -05:00
|
|
|
'uncompromised' => 'The given :attribute has appeared in a data leak. Please choose a different :attribute.',
|
|
|
|
|
],
|
2018-10-22 19:07:32 +01:00
|
|
|
'present' => 'The :attribute field must be present.',
|
2021-11-19 16:51:42 +03:00
|
|
|
'prohibited' => 'The :attribute field is prohibited.',
|
|
|
|
|
'prohibited_if' => 'The :attribute field is prohibited when :other is :value.',
|
|
|
|
|
'prohibited_unless' => 'The :attribute field is prohibited unless :other is in :values.',
|
|
|
|
|
'prohibits' => 'The :attribute field prohibits :other from being present.',
|
2018-10-22 19:07:32 +01:00
|
|
|
'regex' => 'The :attribute format is invalid.',
|
|
|
|
|
'required' => 'The :attribute field is required.',
|
2022-02-07 01:42:53 +03:00
|
|
|
'required_array_keys' => 'The :attribute field must contain entries for: :values.',
|
2018-10-22 19:07:32 +01:00
|
|
|
'required_if' => 'The :attribute field is required when :other is :value.',
|
2022-09-15 08:15:04 -05:00
|
|
|
'required_if_accepted' => 'The :attribute field is required when :other is accepted.',
|
2018-10-22 19:07:32 +01:00
|
|
|
'required_unless' => 'The :attribute field is required unless :other is in :values.',
|
|
|
|
|
'required_with' => 'The :attribute field is required when :values is present.',
|
|
|
|
|
'required_with_all' => 'The :attribute field is required when :values are present.',
|
|
|
|
|
'required_without' => 'The :attribute field is required when :values is not present.',
|
2015-06-01 15:43:37 +01:00
|
|
|
'required_without_all' => 'The :attribute field is required when none of :values are present.',
|
2018-10-22 19:07:32 +01:00
|
|
|
'same' => 'The :attribute and :other must match.',
|
|
|
|
|
'size' => [
|
2022-02-14 23:20:49 +06:00
|
|
|
'array' => 'The :attribute must contain :size items.',
|
2018-10-22 19:07:32 +01:00
|
|
|
'file' => 'The :attribute must be :size kilobytes.',
|
2022-02-14 23:20:49 +06:00
|
|
|
'numeric' => 'The :attribute must be :size.',
|
2018-10-22 19:07:32 +01:00
|
|
|
'string' => 'The :attribute must be :size characters.',
|
2015-02-22 20:47:03 -06:00
|
|
|
],
|
2020-01-12 16:06:29 +01:00
|
|
|
'starts_with' => 'The :attribute must start with one of the following: :values.',
|
2018-10-22 19:07:32 +01:00
|
|
|
'string' => 'The :attribute must be a string.',
|
2021-07-01 23:37:19 +10:00
|
|
|
'timezone' => 'The :attribute must be a valid timezone.',
|
2018-10-22 19:07:32 +01:00
|
|
|
'unique' => 'The :attribute has already been taken.',
|
|
|
|
|
'uploaded' => 'The :attribute failed to upload.',
|
2021-07-01 23:38:06 +10:00
|
|
|
'url' => 'The :attribute must be a valid URL.',
|
2018-10-28 11:04:31 -04:00
|
|
|
'uuid' => 'The :attribute must be a valid UUID.',
|
2013-01-11 15:14:07 -06:00
|
|
|
|
2015-02-22 20:47:03 -06:00
|
|
|
/*
|
|
|
|
|
|--------------------------------------------------------------------------
|
|
|
|
|
| Custom Validation Language Lines
|
|
|
|
|
|--------------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
|
|
| Here you may specify custom validation messages for attributes using the
|
|
|
|
|
| convention "attribute.rule" to name the lines. This makes it quick to
|
|
|
|
|
| specify a specific custom language line for a given attribute rule.
|
|
|
|
|
|
|
|
|
|
|
*/
|
2013-01-11 15:14:07 -06:00
|
|
|
|
2015-02-22 20:47:03 -06:00
|
|
|
'custom' => [
|
|
|
|
|
'attribute-name' => [
|
|
|
|
|
'rule-name' => 'custom-message',
|
|
|
|
|
],
|
|
|
|
|
],
|
2013-01-11 15:14:07 -06:00
|
|
|
|
2015-02-22 20:47:03 -06:00
|
|
|
/*
|
|
|
|
|
|--------------------------------------------------------------------------
|
|
|
|
|
| Custom Validation Attributes
|
|
|
|
|
|--------------------------------------------------------------------------
|
|
|
|
|
|
|
2018-10-30 18:39:37 +11:00
|
|
|
| The following language lines are used to swap our attribute placeholder
|
|
|
|
|
| with something more reader friendly such as "E-Mail Address" instead
|
|
|
|
|
| of "email". This simply helps us make our message more expressive.
|
2015-02-22 20:47:03 -06:00
|
|
|
|
|
|
|
|
|
*/
|
2013-01-11 15:14:07 -06:00
|
|
|
|
2015-02-22 20:47:03 -06:00
|
|
|
'attributes' => [],
|
2013-01-11 15:14:07 -06:00
|
|
|
|
2014-08-28 13:15:07 +03:00
|
|
|
];
|