diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index 012bf19..6a2a9d4 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -9,7 +9,7 @@ jobs: strategy: fail-fast: true matrix: - php: [7.3, 7.4, 8.0] + php: [8.0, 8.1] dependency-version: [prefer-lowest, prefer-stable] name: PHP ${{ matrix.php }} - ${{ matrix.dependency-version }} @@ -24,7 +24,7 @@ jobs: uses: actions/cache@v2 with: path: ~/.composer/cache/files - key: dependencies-laravel-8-php-${{ matrix.php }}-composer-${{ hashFiles('composer.json') }} + key: dependencies-php-${{ matrix.php }}-composer-${{ hashFiles('composer.json') }} - name: Setup PHP uses: shivammathur/setup-php@v2 diff --git a/.scrutinizer.yml b/.scrutinizer.yml index 8a9285f..69d4755 100644 --- a/.scrutinizer.yml +++ b/.scrutinizer.yml @@ -22,7 +22,7 @@ checks: tools: external_code_coverage: timeout: 600 - runs: 6 + runs: 4 php_code_sniffer: enabled: true config: diff --git a/README.md b/README.md index 2879dd3..6f9b27c 100644 --- a/README.md +++ b/README.md @@ -21,7 +21,7 @@ Feel free to check out the [releases](https://github.com/ARCANEDEV/LaravelLang/r * Easy setup & configuration. * Missing translations Checker. * Translations Publisher. - * Laravel `5.x` to `8.x` are supported. + * Laravel `5.x` to `9.x` are supported. * Well documented & IDE Friendly. * Well tested with maximum code quality. * Made with :heart: & :coffee:. @@ -49,16 +49,16 @@ If you discover any security related issues, please email arcanedev.maroc@gmail. - [ARCANEDEV][link-author] - [All Contributors][link-contributors] -[badge_license]: https://img.shields.io/packagist/l/arcanedev/laravel-lang.svg?style=flat-square -[badge_laravel]: https://img.shields.io/badge/Laravel-5.x%20to%208.x-orange.svg?style=flat-square -[badge_build]: https://img.shields.io/github/workflow/status/ARCANEDEV/LaravelLang/run-tests?style=flat-square -[badge_coverage]: https://img.shields.io/scrutinizer/coverage/g/ARCANEDEV/LaravelLang.svg?style=flat-square -[badge_quality]: https://img.shields.io/scrutinizer/g/ARCANEDEV/LaravelLang.svg?style=flat-square -[badge_insight]: https://img.shields.io/sensiolabs/i/8ed2a842-3f4e-4422-a881-cf7eb72a595d.svg?style=flat-square -[badge_issues]: https://img.shields.io/github/issues/ARCANEDEV/LaravelLang.svg?style=flat-square -[badge_package]: https://img.shields.io/badge/package-arcanedev/laravel--lang-blue.svg?style=flat-square -[badge_release]: https://img.shields.io/packagist/v/arcanedev/laravel-lang.svg?style=flat-square -[badge_downloads]: https://img.shields.io/packagist/dt/arcanedev/laravel-lang.svg?style=flat-square +[badge_license]: https://img.shields.io/packagist/l/arcanedev/laravel-lang.svg?style=flat-square +[badge_laravel]: https://img.shields.io/badge/Laravel-5.x%20to%209.x-orange.svg?style=flat-square +[badge_build]: https://img.shields.io/github/workflow/status/ARCANEDEV/LaravelLang/run-tests?style=flat-square +[badge_coverage]: https://img.shields.io/scrutinizer/coverage/g/ARCANEDEV/LaravelLang.svg?style=flat-square +[badge_quality]: https://img.shields.io/scrutinizer/g/ARCANEDEV/LaravelLang.svg?style=flat-square +[badge_insight]: https://img.shields.io/sensiolabs/i/8ed2a842-3f4e-4422-a881-cf7eb72a595d.svg?style=flat-square +[badge_issues]: https://img.shields.io/github/issues/ARCANEDEV/LaravelLang.svg?style=flat-square +[badge_package]: https://img.shields.io/badge/package-arcanedev/laravel--lang-blue.svg?style=flat-square +[badge_release]: https://img.shields.io/packagist/v/arcanedev/laravel-lang.svg?style=flat-square +[badge_downloads]: https://img.shields.io/packagist/dt/arcanedev/laravel-lang.svg?style=flat-square [link-author]: https://github.com/arcanedev-maroc [link-github-repo]: https://github.com/ARCANEDEV/LaravelLang diff --git a/_docs/0-Home.md b/_docs/0-Home.md deleted file mode 100644 index 530aeeb..0000000 --- a/_docs/0-Home.md +++ /dev/null @@ -1,19 +0,0 @@ -# LaravelLang - -Translations manager and checker for Laravel based on [caouecs/Laravel-lang](https://github.com/caouecs/Laravel-lang) translations. - -### Features - - * Easy setup & configuration. - * Missing translations Checker. - * Translations Publisher. - * Laravel `5.x` to `8.x` are supported. - * Well documented & IDE Friendly. - * Well tested with maximum code quality. - * Made with :heart: & :coffee:. - -## Table of contents - - 1. [Installation and Setup](1-Installation-and-Setup.md) - 2. [Configuration](2-Configuration.md) - 3. [Usage](3-Usage.md) diff --git a/_docs/1-Installation-and-Setup.md b/_docs/1-Installation-and-Setup.md index 3a0cdc5..bb135c1 100644 --- a/_docs/1-Installation-and-Setup.md +++ b/_docs/1-Installation-and-Setup.md @@ -8,21 +8,23 @@ ## Version Compatibility -| Laravel | LaravelLang | -|:-----------------------------|:--------------------------------------| -| ![Laravel v8.x][laravel_8_x] | ![LaravelLang v9.x][laravel_lang_9_x] | -| ![Laravel v7.x][laravel_7_x] | ![LaravelLang v8.x][laravel_lang_8_x] | -| ![Laravel v6.x][laravel_6_x] | ![LaravelLang v7.x][laravel_lang_7_x] | -| ![Laravel v5.8][laravel_5_8] | ![LaravelLang v6.x][laravel_lang_6_x] | -| ![Laravel v5.7][laravel_5_7] | ![LaravelLang v5.x][laravel_lang_5_x] | -| ![Laravel v5.6][laravel_5_6] | ![LaravelLang v4.x][laravel_lang_4_x] | -| ![Laravel v5.5][laravel_5_5] | ![LaravelLang v3.x][laravel_lang_3_x] | -| ![Laravel v5.4][laravel_5_4] | ![LaravelLang v2.x][laravel_lang_2_x] | -| ![Laravel v5.3][laravel_5_3] | ![LaravelLang v1.x][laravel_lang_1_x] | -| ![Laravel v5.2][laravel_5_2] | ![LaravelLang v1.x][laravel_lang_1_x] | -| ![Laravel v5.1][laravel_5_1] | ![LaravelLang v1.x][laravel_lang_1_x] | -| ![Laravel v5.0][laravel_5_0] | ![LaravelLang v1.x][laravel_lang_1_x] | - +| Laravel | LaravelLang | +|:-----------------------------|:----------------------------------------| +| ![Laravel v9.x][laravel_9_x] | ![LaravelLang v10.x][laravel_lang_10_x] | +| ![Laravel v8.x][laravel_8_x] | ![LaravelLang v9.x][laravel_lang_9_x] | +| ![Laravel v7.x][laravel_7_x] | ![LaravelLang v8.x][laravel_lang_8_x] | +| ![Laravel v6.x][laravel_6_x] | ![LaravelLang v7.x][laravel_lang_7_x] | +| ![Laravel v5.8][laravel_5_8] | ![LaravelLang v6.x][laravel_lang_6_x] | +| ![Laravel v5.7][laravel_5_7] | ![LaravelLang v5.x][laravel_lang_5_x] | +| ![Laravel v5.6][laravel_5_6] | ![LaravelLang v4.x][laravel_lang_4_x] | +| ![Laravel v5.5][laravel_5_5] | ![LaravelLang v3.x][laravel_lang_3_x] | +| ![Laravel v5.4][laravel_5_4] | ![LaravelLang v2.x][laravel_lang_2_x] | +| ![Laravel v5.3][laravel_5_3] | ![LaravelLang v1.x][laravel_lang_1_x] | +| ![Laravel v5.2][laravel_5_2] | ![LaravelLang v1.x][laravel_lang_1_x] | +| ![Laravel v5.1][laravel_5_1] | ![LaravelLang v1.x][laravel_lang_1_x] | +| ![Laravel v5.0][laravel_5_0] | ![LaravelLang v1.x][laravel_lang_1_x] | + +[laravel_9_x]: https://img.shields.io/badge/version-9.x-blue.svg?style=flat-square "Laravel v9.x" [laravel_8_x]: https://img.shields.io/badge/version-8.x-blue.svg?style=flat-square "Laravel v8.x" [laravel_7_x]: https://img.shields.io/badge/version-7.x-blue.svg?style=flat-square "Laravel v7.x" [laravel_6_x]: https://img.shields.io/badge/version-6.x-blue.svg?style=flat-square "Laravel v6.x" @@ -36,6 +38,7 @@ [laravel_5_1]: https://img.shields.io/badge/version-5.1-blue.svg?style=flat-square "Laravel v5.1" [laravel_5_0]: https://img.shields.io/badge/version-5.0-blue.svg?style=flat-square "Laravel v5.0" +[laravel_lang_10_x]: https://img.shields.io/badge/version-10.x-blue.svg?style=flat-square "LaravelLang v10.x" [laravel_lang_9_x]: https://img.shields.io/badge/version-9.x-blue.svg?style=flat-square "LaravelLang v9.x" [laravel_lang_8_x]: https://img.shields.io/badge/version-8.x-blue.svg?style=flat-square "LaravelLang v8.x" [laravel_lang_7_x]: https://img.shields.io/badge/version-7.x-blue.svg?style=flat-square "LaravelLang v7.x" diff --git a/composer.json b/composer.json index c4ca567..d59b0bb 100644 --- a/composer.json +++ b/composer.json @@ -1,6 +1,6 @@ { "name": "arcanedev/laravel-lang", - "description": "Translations manager and checker for Laravel based on 'caouecs/laravel-lang' package.", + "description": "Translations manager and checker for Laravel based on 'Laravel-Lang/lang' package.", "homepage": "https://github.com/ARCANEDEV/LaravelLang", "keywords": [ "arcanedev", "laravel", "translations", "trans", "languages", "lang", "localisation", "localization", "validations" @@ -16,15 +16,15 @@ "type": "library", "license": "MIT", "require": { - "php": "^7.3|^8.0", + "php": "^8.0", "arcanedev/support": "^9.0", - "laravel-lang/lang": "^9.0" + "laravel-lang/lang": "^10.4.2" }, "require-dev": { - "laravel/framework": "^8.40", - "mockery/mockery": "^1.4.2", + "laravel/framework": "^9.0", + "mockery/mockery": "^1.4.4", "orchestra/testbench-core": "^7.0", - "phpunit/phpunit": "^9.3.3" + "phpunit/phpunit": "^9.5.10" }, "autoload": { "psr-4": { diff --git a/tests/TestCase.php b/tests/TestCase.php index 6d8e0da..b1a1ad0 100644 --- a/tests/TestCase.php +++ b/tests/TestCase.php @@ -25,7 +25,7 @@ abstract class TestCase extends BaseTestCase */ protected $locales = [ 'af', 'ar', 'az', 'be', 'bg', 'bn', 'bs', 'ca', 'cs', 'cy', 'da', 'de', 'de_CH', 'el', 'es', 'et', 'eu', 'fa', - 'fi', 'fil', 'fr', 'gl', 'he', 'hi', 'hr', 'hu', 'hy', 'id', 'is', 'it', 'ja', 'ka', 'kk', 'km', 'kn', 'ko', + 'fi', 'fil', 'fr', 'gl', 'gu', 'he', 'hi', 'hr', 'hu', 'hy', 'id', 'is', 'it', 'ja', 'ka', 'kk', 'km', 'kn', 'ko', 'lt', 'lv', 'mk', 'mn', 'mr', 'ms', 'nb', 'ne', 'nl', 'nn', 'oc', 'pl', 'ps', 'pt', 'pt_BR', 'ro', 'ru', 'sc', 'si', 'sk', 'sl', 'sq', 'sr_Cyrl', 'sr_Latn', 'sr_Latn_ME', 'sv', 'sw', 'tg', 'th', 'tk', 'tl', 'tr', 'ug', 'uk', 'ur', 'uz_Cyrl', 'uz_Latn', 'vi', 'zh_CN', 'zh_HK', 'zh_TW', @@ -98,7 +98,7 @@ private function copyLanguagesFixtures($app) $filesystem->copyDirectory( realpath(__DIR__.DIRECTORY_SEPARATOR.'fixtures'.DIRECTORY_SEPARATOR.'lang'), - realpath(resource_path('lang')) + $app->langPath() ); } @@ -121,8 +121,25 @@ protected function filesystem() */ protected function cleanLangDirectory(string $locale): bool { - return $this->filesystem() - ->cleanDirectory($this->app->langPath().DIRECTORY_SEPARATOR.$locale); + return $this + ->filesystem() + ->cleanDirectory($this->app->langPath().DIRECTORY_SEPARATOR.$locale) + ; + } + + /** + * Determine if the lang directory exists. + * + * @param string $locale + * + * @return bool + */ + protected function langDirectoryExists(string $locale): bool + { + return $this + ->filesystem() + ->exists($this->app->langPath().DIRECTORY_SEPARATOR.$locale) + ; } /** @@ -134,8 +151,10 @@ protected function cleanLangDirectory(string $locale): bool */ protected function deleteLangDirectory(string $locale): bool { - return $this->filesystem() - ->deleteDirectory($this->app->langPath().DIRECTORY_SEPARATOR.$locale); + return $this + ->filesystem() + ->deleteDirectory($this->app->langPath().DIRECTORY_SEPARATOR.$locale) + ; } /** diff --git a/tests/TransPublisherTest.php b/tests/TransPublisherTest.php index 6aed179..1f35615 100644 --- a/tests/TransPublisherTest.php +++ b/tests/TransPublisherTest.php @@ -63,12 +63,16 @@ public function it_can_publish(): void { $locale = 'es'; + if ($this->langDirectoryExists($locale)) + $this->deleteLangDirectory($locale); + static::assertEquals([ 'published' => [ 'es/auth.php', 'es/es.json', 'es/pagination.php', 'es/passwords.php', + 'es/validation-nova.php', 'es/validation.php', ], 'skipped' => [], @@ -83,6 +87,7 @@ public function it_can_publish(): void 'es/es.json', 'es/pagination.php', 'es/passwords.php', + 'es/validation-nova.php', 'es/validation.php', ], 'skipped' => [], @@ -97,12 +102,16 @@ public function it_can_not_publish_if_is_not_forced(): void { $locale = 'es'; + if ($this->langDirectoryExists($locale)) + $this->deleteLangDirectory($locale); + static::assertEquals([ 'published' => [ 'es/auth.php', 'es/es.json', 'es/pagination.php', 'es/passwords.php', + 'es/validation-nova.php', 'es/validation.php', ], 'skipped' => [], @@ -115,6 +124,7 @@ public function it_can_not_publish_if_is_not_forced(): void 'es/es.json', 'es/pagination.php', 'es/passwords.php', + 'es/validation-nova.php', 'es/validation.php', ], ], $this->publisher->publish($locale)); @@ -128,12 +138,16 @@ public function it_can_publish_on_force(): void { $locale = 'es'; + if ($this->langDirectoryExists($locale)) + $this->deleteLangDirectory($locale); + $excepted = [ 'published' => [ 'es/auth.php', 'es/es.json', 'es/pagination.php', 'es/passwords.php', + 'es/validation-nova.php', 'es/validation.php', ], 'skipped' => [], diff --git a/tests/fixtures/lang/en/validation-nova-inline.php b/tests/fixtures/lang/en/validation-nova-inline.php new file mode 100644 index 0000000..fd25498 --- /dev/null +++ b/tests/fixtures/lang/en/validation-nova-inline.php @@ -0,0 +1,17 @@ + 'This field is already attached.', + 'relatable' => 'This field may not be associated with this resource.', +]; diff --git a/tests/fixtures/lang/en/validation-nova.php b/tests/fixtures/lang/en/validation-nova.php new file mode 100644 index 0000000..b4d6cc7 --- /dev/null +++ b/tests/fixtures/lang/en/validation-nova.php @@ -0,0 +1,17 @@ + 'This :attribute is already attached.', + 'relatable' => 'This :attribute may not be associated with this resource.', +]; diff --git a/tests/fixtures/lang/en/validation.php b/tests/fixtures/lang/en/validation.php index aab6dc0..4707f1a 100644 --- a/tests/fixtures/lang/en/validation.php +++ b/tests/fixtures/lang/en/validation.php @@ -1,6 +1,7 @@ 'The :attribute must be accepted.', - '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.', - 'alpha' => 'The :attribute may only contain letters.', - 'alpha_dash' => 'The :attribute may only contain letters, numbers, dashes and underscores.', - 'alpha_num' => 'The :attribute may only contain letters and numbers.', - 'array' => 'The :attribute must be an array.', - 'attached' => 'This :attribute is already attached.', - 'before' => 'The :attribute must be a date before :date.', - 'before_or_equal' => 'The :attribute must be a date before or equal to :date.', - 'between' => [ + 'accepted' => 'The :attribute must be accepted.', + 'accepted_if' => 'The :attribute must be accepted when :other is :value.', + '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.', + '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.', + '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' => [ + 'array' => 'The :attribute must have between :min and :max items.', + 'file' => 'The :attribute must be between :min and :max kilobytes.', 'numeric' => 'The :attribute must be between :min and :max.', - 'file' => 'The :attribute must be between :min and :max kilobytes.', - 'string' => 'The :attribute must be between :min and :max characters.', - 'array' => 'The :attribute must have between :min and :max items.', + 'string' => 'The :attribute must be between :min and :max characters.', ], - 'boolean' => 'The :attribute field must be true or false.', - 'confirmed' => 'The :attribute confirmation does not match.', - 'date' => 'The :attribute is not a valid date.', - 'date_equals' => 'The :attribute must be a date equal to :date.', - 'date_format' => 'The :attribute does not match the format :format.', - '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.', - 'email' => 'The :attribute must be a valid email address.', - 'ends_with' => 'The :attribute must end with one of the following: :values.', - 'exists' => 'The selected :attribute is invalid.', - 'file' => 'The :attribute must be a file.', - 'filled' => 'The :attribute field must have a value.', - 'gt' => [ + 'boolean' => 'The :attribute field must be true or false.', + 'confirmed' => 'The :attribute confirmation does not match.', + 'current_password' => 'The password is incorrect.', + 'date' => 'The :attribute is not a valid date.', + 'date_equals' => 'The :attribute must be a date equal to :date.', + 'date_format' => 'The :attribute does not match the format :format.', + 'declined' => 'The :attribute must be declined.', + 'declined_if' => 'The :attribute must be declined when :other is :value.', + '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.', + 'email' => 'The :attribute must be a valid email address.', + 'ends_with' => 'The :attribute must end with one of the following: :values.', + 'enum' => 'The selected :attribute is invalid.', + 'exists' => 'The selected :attribute is invalid.', + 'file' => 'The :attribute must be a file.', + 'filled' => 'The :attribute field must have a value.', + 'gt' => [ + 'array' => 'The :attribute must have more than :value items.', + 'file' => 'The :attribute must be greater than :value kilobytes.', 'numeric' => 'The :attribute must be greater than :value.', - 'file' => 'The :attribute must be greater than :value kilobytes.', - 'string' => 'The :attribute must be greater than :value characters.', - 'array' => 'The :attribute must have more than :value items.', + 'string' => 'The :attribute must be greater than :value characters.', ], - 'gte' => [ - 'numeric' => 'The :attribute must be greater than or equal :value.', - 'file' => 'The :attribute must be greater than or equal :value kilobytes.', - 'string' => 'The :attribute must be greater than or equal :value characters.', - 'array' => 'The :attribute must have :value items or more.', + 'gte' => [ + 'array' => 'The :attribute must have :value items or more.', + 'file' => 'The :attribute must be greater than or equal to :value kilobytes.', + 'numeric' => 'The :attribute must be greater than or equal to :value.', + 'string' => 'The :attribute must be greater than or equal to :value characters.', ], - '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' => [ + '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' => [ + 'array' => 'The :attribute must have less than :value items.', + 'file' => 'The :attribute must be less than :value kilobytes.', 'numeric' => 'The :attribute must be less than :value.', - 'file' => 'The :attribute must be less than :value kilobytes.', - 'string' => 'The :attribute must be less than :value characters.', - 'array' => 'The :attribute must have less than :value items.', + 'string' => 'The :attribute must be less than :value characters.', ], - 'lte' => [ - 'numeric' => 'The :attribute must be less than or equal :value.', - 'file' => 'The :attribute must be less than or equal :value kilobytes.', - 'string' => 'The :attribute must be less than or equal :value characters.', - 'array' => 'The :attribute must not have more than :value items.', + 'lte' => [ + 'array' => 'The :attribute must not have more than :value items.', + 'file' => 'The :attribute must be less than or equal to :value kilobytes.', + 'numeric' => 'The :attribute must be less than or equal to :value.', + 'string' => 'The :attribute must be less than or equal to :value characters.', ], - '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.', + 'mac_address' => 'The :attribute must be a valid MAC address.', + 'max' => [ + 'array' => 'The :attribute must not have more than :max items.', + 'file' => 'The :attribute must not be greater than :max kilobytes.', + 'numeric' => 'The :attribute must not be greater than :max.', + 'string' => 'The :attribute must not be greater than :max characters.', ], - 'mimes' => 'The :attribute must be a file of type: :values.', - 'mimetypes' => 'The :attribute must be a file of type: :values.', - 'min' => [ + 'mimes' => 'The :attribute must be a file of type: :values.', + 'mimetypes' => 'The :attribute must be a file of type: :values.', + 'min' => [ + 'array' => 'The :attribute must have at least :min items.', + 'file' => 'The :attribute must be at least :min kilobytes.', '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.', + 'string' => 'The :attribute must be at least :min characters.', ], - 'multiple_of' => 'The :attribute must be a multiple of :value', - 'not_in' => 'The selected :attribute is invalid.', - 'not_regex' => 'The :attribute format is invalid.', - 'numeric' => 'The :attribute must be a number.', - 'password' => 'The password is incorrect.', - 'present' => 'The :attribute field must be present.', - 'regex' => 'The :attribute format is invalid.', - 'relatable' => 'This :attribute may not be associated with this resource.', - 'required' => 'The :attribute field is required.', - 'required_if' => 'The :attribute field is required when :other is :value.', - '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.', + 'multiple_of' => 'The :attribute must be a multiple of :value.', + 'not_in' => 'The selected :attribute is invalid.', + 'not_regex' => 'The :attribute format is invalid.', + 'numeric' => 'The :attribute must be a number.', + 'password' => 'The password is incorrect.', + 'present' => 'The :attribute field must be present.', + '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.', + 'regex' => 'The :attribute format is invalid.', + 'required' => 'The :attribute field is required.', + 'required_array_keys' => 'The :attribute field must contain entries for: :values.', + 'required_if' => 'The :attribute field is required when :other is :value.', + '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.', 'required_without_all' => 'The :attribute field is required when none of :values are present.', - '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.', - 'same' => 'The :attribute and :other must match.', - 'size' => [ + 'same' => 'The :attribute and :other must match.', + 'size' => [ + 'array' => 'The :attribute must contain :size items.', + 'file' => 'The :attribute must be :size kilobytes.', 'numeric' => 'The :attribute must be :size.', - 'file' => 'The :attribute must be :size kilobytes.', - 'string' => 'The :attribute must be :size characters.', - 'array' => 'The :attribute must contain :size items.', + 'string' => 'The :attribute must be :size characters.', ], - 'starts_with' => 'The :attribute must start with one of the following: :values.', - 'string' => 'The :attribute must be a string.', - 'timezone' => 'The :attribute must be a valid zone.', - 'unique' => 'The :attribute has already been taken.', - 'uploaded' => 'The :attribute failed to upload.', - 'url' => 'The :attribute format is invalid.', - 'uuid' => 'The :attribute must be a valid UUID.', + 'starts_with' => 'The :attribute must start with one of the following: :values.', + 'string' => 'The :attribute must be a string.', + 'timezone' => 'The :attribute must be a valid timezone.', + 'unique' => 'The :attribute has already been taken.', + 'uploaded' => 'The :attribute failed to upload.', + 'url' => 'The :attribute must be a valid URL.', + 'uuid' => 'The :attribute must be a valid UUID.', /* |-------------------------------------------------------------------------- @@ -152,4 +159,5 @@ */ 'attributes' => [], + ];