📘

Laravel バリデーションメッセージの日本語化 - 生成AI各モデルの翻訳比較検証

に公開

はじめに

Laravelのバージョンアップ作業を行っていたのですが、バリデーションメッセージが増えていたので、増えた分を日本語化しようというところから思い立ちました。

Laravelでのアプリケーションを開発において、バリデーションを実施する際にLangを用いてエラーメッセージの日本語化を行います。
公式の多言語対応としてLaravel Langがあったり、日本語メッセージに変換可能な様々なパッケージが存在します。

今回作業対象としたアプリケーションでは元々そういったパッケージを導入していなかった事もあり、直接validation.phpの日本語翻訳を実施することにしました。
どうせなら複数のAIで試して比較してみよう、ということで ChatGPT、Claude、Gemini、DeepSeek の複数モデルで試しています。

プロンプト

それほど工夫したプロンプトではないですが

laravelのvalidattion.phpです。
各行の'=>' 右側の英語メッセージを日本語メッセージに変更

ですます調

':'で始まる単語は変数名なので英語のまま

例)
変更前: 'accepted' => 'The :attribute field must be accepted.',
変更後: 'accepted' => ':attributeを承認してください。',

変換比較

※長いので折りたたんでいます。

元ファイル(validation.php)

Custom Validation部分やコメントは除去しています。

元ファイル(validation.php)
<?php

return [
    'accepted' => 'The :attribute field must be accepted.',
    'accepted_if' => 'The :attribute field must be accepted when :other is :value.',
    'active_url' => 'The :attribute field must be a valid URL.',
    'after' => 'The :attribute field must be a date after :date.',
    'after_or_equal' => 'The :attribute field must be a date after or equal to :date.',
    'alpha' => 'The :attribute field must only contain letters.',
    'alpha_dash' => 'The :attribute field must only contain letters, numbers, dashes, and underscores.',
    'alpha_num' => 'The :attribute field must only contain letters and numbers.',
    'array' => 'The :attribute field must be an array.',
    'ascii' => 'The :attribute field must only contain single-byte alphanumeric characters and symbols.',
    'before' => 'The :attribute field must be a date before :date.',
    'before_or_equal' => 'The :attribute field must be a date before or equal to :date.',
    'between' => [
        'array' => 'The :attribute field must have between :min and :max items.',
        'file' => 'The :attribute field must be between :min and :max kilobytes.',
        'numeric' => 'The :attribute field must be between :min and :max.',
        'string' => 'The :attribute field must be between :min and :max characters.',
    ],
    'boolean' => 'The :attribute field must be true or false.',
    'can' => 'The :attribute field contains an unauthorized value.',
    'confirmed' => 'The :attribute field confirmation does not match.',
    'current_password' => 'The password is incorrect.',
    'date' => 'The :attribute field must be a valid date.',
    'date_equals' => 'The :attribute field must be a date equal to :date.',
    'date_format' => 'The :attribute field must match the format :format.',
    'decimal' => 'The :attribute field must have :decimal decimal places.',
    'declined' => 'The :attribute field must be declined.',
    'declined_if' => 'The :attribute field must be declined when :other is :value.',
    'different' => 'The :attribute field and :other must be different.',
    'digits' => 'The :attribute field must be :digits digits.',
    'digits_between' => 'The :attribute field must be between :min and :max digits.',
    'dimensions' => 'The :attribute field has invalid image dimensions.',
    'distinct' => 'The :attribute field has a duplicate value.',
    'doesnt_end_with' => 'The :attribute field must not end with one of the following: :values.',
    'doesnt_start_with' => 'The :attribute field must not start with one of the following: :values.',
    'email' => 'The :attribute field must be a valid email address.',
    'ends_with' => 'The :attribute field must end with one of the following: :values.',
    'enum' => 'The selected :attribute is invalid.',
    'exists' => 'The selected :attribute is invalid.',
    'extensions' => 'The :attribute field must have one of the following extensions: :values.',
    'file' => 'The :attribute field must be a file.',
    'filled' => 'The :attribute field must have a value.',
    'gt' => [
        'array' => 'The :attribute field must have more than :value items.',
        'file' => 'The :attribute field must be greater than :value kilobytes.',
        'numeric' => 'The :attribute field must be greater than :value.',
        'string' => 'The :attribute field must be greater than :value characters.',
    ],
    'gte' => [
        'array' => 'The :attribute field must have :value items or more.',
        'file' => 'The :attribute field must be greater than or equal to :value kilobytes.',
        'numeric' => 'The :attribute field must be greater than or equal to :value.',
        'string' => 'The :attribute field must be greater than or equal to :value characters.',
    ],
    'hex_color' => 'The :attribute field must be a valid hexadecimal color.',
    'image' => 'The :attribute field must be an image.',
    'in' => 'The selected :attribute is invalid.',
    'in_array' => 'The :attribute field must exist in :other.',
    'integer' => 'The :attribute field must be an integer.',
    'ip' => 'The :attribute field must be a valid IP address.',
    'ipv4' => 'The :attribute field must be a valid IPv4 address.',
    'ipv6' => 'The :attribute field must be a valid IPv6 address.',
    'json' => 'The :attribute field must be a valid JSON string.',
    'lowercase' => 'The :attribute field must be lowercase.',
    'lt' => [
        'array' => 'The :attribute field must have less than :value items.',
        'file' => 'The :attribute field must be less than :value kilobytes.',
        'numeric' => 'The :attribute field must be less than :value.',
        'string' => 'The :attribute field must be less than :value characters.',
    ],
    'lte' => [
        'array' => 'The :attribute field must not have more than :value items.',
        'file' => 'The :attribute field must be less than or equal to :value kilobytes.',
        'numeric' => 'The :attribute field must be less than or equal to :value.',
        'string' => 'The :attribute field must be less than or equal to :value characters.',
    ],
    'mac_address' => 'The :attribute field must be a valid MAC address.',
    'max' => [
        'array' => 'The :attribute field must not have more than :max items.',
        'file' => 'The :attribute field must not be greater than :max kilobytes.',
        'numeric' => 'The :attribute field must not be greater than :max.',
        'string' => 'The :attribute field must not be greater than :max characters.',
    ],
    'max_digits' => 'The :attribute field must not have more than :max digits.',
    'mimes' => 'The :attribute field must be a file of type: :values.',
    'mimetypes' => 'The :attribute field must be a file of type: :values.',
    'min' => [
        'array' => 'The :attribute field must have at least :min items.',
        'file' => 'The :attribute field must be at least :min kilobytes.',
        'numeric' => 'The :attribute field must be at least :min.',
        'string' => 'The :attribute field must be at least :min characters.',
    ],
    'min_digits' => 'The :attribute field must have at least :min digits.',
    'missing' => 'The :attribute field must be missing.',
    'missing_if' => 'The :attribute field must be missing when :other is :value.',
    'missing_unless' => 'The :attribute field must be missing unless :other is :value.',
    'missing_with' => 'The :attribute field must be missing when :values is present.',
    'missing_with_all' => 'The :attribute field must be missing when :values are present.',
    'multiple_of' => 'The :attribute field must be a multiple of :value.',
    'not_in' => 'The selected :attribute is invalid.',
    'not_regex' => 'The :attribute field format is invalid.',
    'numeric' => 'The :attribute field must be a number.',
    'password' => [
        'letters' => 'The :attribute field must contain at least one letter.',
        'mixed' => 'The :attribute field must contain at least one uppercase and one lowercase letter.',
        'numbers' => 'The :attribute field must contain at least one number.',
        'symbols' => 'The :attribute field must contain at least one symbol.',
        'uncompromised' => 'The given :attribute has appeared in a data leak. Please choose a different :attribute.',
    ],
    'present' => 'The :attribute field must be present.',
    'present_if' => 'The :attribute field must be present when :other is :value.',
    'present_unless' => 'The :attribute field must be present unless :other is :value.',
    'present_with' => 'The :attribute field must be present when :values is present.',
    'present_with_all' => 'The :attribute field must be present when :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.',
    'prohibits' => 'The :attribute field prohibits :other from being present.',
    'regex' => 'The :attribute field 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_if_accepted' => 'The :attribute field is required when :other is accepted.',
    '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.',
    'same' => 'The :attribute field must match :other.',
    'size' => [
        'array' => 'The :attribute field must contain :size items.',
        'file' => 'The :attribute field must be :size kilobytes.',
        'numeric' => 'The :attribute field must be :size.',
        'string' => 'The :attribute field must be :size characters.',
    ],
    'starts_with' => 'The :attribute field must start with one of the following: :values.',
    'string' => 'The :attribute field must be a string.',
    'timezone' => 'The :attribute field must be a valid timezone.',
    'unique' => 'The :attribute has already been taken.',
    'uploaded' => 'The :attribute failed to upload.',
    'uppercase' => 'The :attribute field must be uppercase.',
    'url' => 'The :attribute field must be a valid URL.',
    'ulid' => 'The :attribute field must be a valid ULID.',
    'uuid' => 'The :attribute field must be a valid UUID.',
];

ChatGPT O3-mini

ChatGPT O3-mini
<?php

return [
    'accepted' => ':attributeを承認してください。',
    'accepted_if' => ':otherが:valueの場合、:attributeを承認してください。',
    'active_url' => ':attributeには有効なURLを指定してください。',
    'after' => ':date以降の日付を:attributeに指定してください。',
    'after_or_equal' => ':date以降または同日の日付を:attributeに指定してください。',
    'alpha' => ':attributeにはアルファベットのみを使用してください。',
    'alpha_dash' => ':attributeにはアルファベット、数字、ダッシュ、およびアンダースコアのみを使用してください。',
    'alpha_num' => ':attributeにはアルファベットと数字のみを使用してください。',
    'array' => ':attributeには配列を指定してください。',
    'ascii' => ':attributeにはシングルバイトの英数字および記号のみを使用してください。',
    'before' => ':date以前の日付を:attributeに指定してください。',
    'before_or_equal' => ':date以前または同日の日付を:attributeに指定してください。',
    'between' => [
        'array' => ':attributeは:minから:max個の項目を持つ必要があります。',
        'file' => ':attributeは:minから:maxキロバイトのファイルでなければなりません。',
        'numeric' => ':attributeは:minから:maxの間でなければなりません。',
        'string' => ':attributeは:minから:max文字でなければなりません。',
    ],
    'boolean' => ':attributeはtrueまたはfalseでなければなりません。',
    'can' => ':attributeに不正な値が含まれています。',
    'confirmed' => ':attributeの確認が一致しません。',
    'current_password' => '現在のパスワードが正しくありません。',
    'date' => ':attributeには有効な日付を指定してください。',
    'date_equals' => ':dateと同じ日付を:attributeに指定してください。',
    'date_format' => ':attributeは:formatの形式と一致していません。',
    'decimal' => ':attributeは:decimal桁の小数を含む必要があります。',
    'declined' => ':attributeを拒否してください。',
    'declined_if' => ':otherが:valueの場合、:attributeを拒否してください。',
    'different' => ':attributeと:otherは異なるものでなければなりません。',
    'digits' => ':attributeは:digits桁でなければなりません。',
    'digits_between' => ':attributeは:minから:max桁でなければなりません。',
    'dimensions' => ':attributeの画像寸法が正しくありません。',
    'distinct' => ':attributeに重複した値が含まれています。',
    'doesnt_end_with' => ':attributeは次のいずれかで終わってはなりません: :values。',
    'doesnt_start_with' => ':attributeは次のいずれかで始まってはなりません: :values。',
    'email' => ':attributeには有効なメールアドレスを指定してください。',
    'ends_with' => ':attributeは次のいずれかで終わらなければなりません: :values。',
    'enum' => '選択された:attributeは無効です。',
    'exists' => '選択された:attributeは無効です。',
    'extensions' => ':attributeは次の拡張子のいずれかでなければなりません: :values。',
    'file' => ':attributeにはファイルを指定してください。',
    'filled' => ':attributeには値を指定してください。',
    'gt' => [
        'array' => ':attributeは:value個より多くの項目が必要です。',
        'file' => ':attributeは:valueキロバイトより大きくなければなりません。',
        'numeric' => ':attributeは:valueより大きくなければなりません。',
        'string' => ':attributeは:value文字より多くなければなりません。',
    ],
    'gte' => [
        'array' => ':attributeは:value個以上の項目が必要です。',
        'file' => ':attributeは:valueキロバイト以上でなければなりません。',
        'numeric' => ':attributeは:value以上でなければなりません。',
        'string' => ':attributeは:value文字以上でなければなりません。',
    ],
    'hex_color' => ':attributeには有効な16進数カラーコードを指定してください。',
    'image' => ':attributeには画像を指定してください。',
    'in' => '選択された:attributeは無効です。',
    'in_array' => ':attributeは:otherに存在する必要があります。',
    'integer' => ':attributeには整数を指定してください。',
    'ip' => ':attributeには有効なIPアドレスを指定してください。',
    'ipv4' => ':attributeには有効なIPv4アドレスを指定してください。',
    'ipv6' => ':attributeには有効なIPv6アドレスを指定してください。',
    'json' => ':attributeには有効なJSON文字列を指定してください。',
    'lowercase' => ':attributeは小文字でなければなりません。',
    'lt' => [
        'array' => ':attributeは:value個未満の項目が必要です。',
        'file' => ':attributeは:valueキロバイト未満でなければなりません。',
        'numeric' => ':attributeは:valueより小さくなければなりません。',
        'string' => ':attributeは:value文字未満でなければなりません。',
    ],
    'lte' => [
        'array' => ':attributeは:value個以下の項目でなければなりません。',
        'file' => ':attributeは:valueキロバイト以下でなければなりません。',
        'numeric' => ':attributeは:value以下でなければなりません。',
        'string' => ':attributeは:value文字以下でなければなりません。',
    ],
    'mac_address' => ':attributeには有効なMACアドレスを指定してください。',
    'max' => [
        'array' => ':attributeは:max個以下の項目でなければなりません。',
        'file' => ':attributeは:maxキロバイト以下でなければなりません。',
        'numeric' => ':attributeは:max以下でなければなりません。',
        'string' => ':attributeは:max文字以下でなければなりません。',
    ],
    'max_digits' => ':attributeは:max桁以内でなければなりません。',
    'mimes' => ':attributeは次のファイルタイプでなければなりません: :values。',
    'mimetypes' => ':attributeは次のファイルタイプでなければなりません: :values。',
    'min' => [
        'array' => ':attributeは少なくとも:min個の項目が必要です。',
        'file' => ':attributeは:minキロバイト以上でなければなりません。',
        'numeric' => ':attributeは:min以上でなければなりません。',
        'string' => ':attributeは:min文字以上でなければなりません。',
    ],
    'min_digits' => ':attributeは少なくとも:min桁必要です。',
    'missing' => ':attributeは存在してはいけません。',
    'missing_if' => ':otherが:valueの場合、:attributeは存在してはいけません。',
    'missing_unless' => ':otherが:valueでない場合、:attributeは存在してはいけません。',
    'missing_with' => ':valuesが存在する場合、:attributeは存在してはいけません。',
    'missing_with_all' => ':valuesが存在する場合、:attributeは存在してはいけません。',
    'multiple_of' => ':attributeは:valueの倍数でなければなりません。',
    'not_in' => '選択された:attributeは無効です。',
    'not_regex' => ':attributeの形式が正しくありません。',
    'numeric' => ':attributeは数字でなければなりません。',
    'password' => [
        'letters' => ':attributeには少なくとも1つの英字を含める必要があります。',
        'mixed' => ':attributeには少なくとも1つの大文字と1つの小文字を含める必要があります。',
        'numbers' => ':attributeには少なくとも1つの数字を含める必要があります。',
        'symbols' => ':attributeには少なくとも1つの記号を含める必要があります。',
        'uncompromised' => '入力された:attributeは漏洩している可能性があります。別の:attributeをお選びください。',
    ],
    'present' => ':attributeは存在している必要があります。',
    'present_if' => ':otherが:valueの場合、:attributeは存在している必要があります。',
    'present_unless' => ':otherが:valueでない場合、:attributeは存在している必要があります。',
    'present_with' => ':valuesが存在する場合、:attributeは存在している必要があります。',
    'present_with_all' => ':valuesが存在する場合、:attributeは存在している必要があります。',
    'prohibited' => ':attributeの入力は許可されていません。',
    'prohibited_if' => ':otherが:valueの場合、:attributeの入力は許可されていません。',
    'prohibited_unless' => ':otherが:valuesに含まれていない場合、:attributeの入力は許可されていません。',
    'prohibits' => ':attributeは:otherの入力を禁止しています。',
    'regex' => ':attributeの形式が無効です。',
    'required' => ':attributeは必須です。',
    'required_array_keys' => ':attributeには:valuesの項目を含める必要があります。',
    'required_if' => ':otherが:valueの場合、:attributeは必須です。',
    'required_if_accepted' => ':otherが承認されている場合、:attributeは必須です。',
    'required_unless' => ':otherが:valuesに含まれていない場合、:attributeは必須です。',
    'required_with' => ':valuesが存在する場合、:attributeは必須です。',
    'required_with_all' => ':valuesが存在する場合、:attributeは必須です。',
    'required_without' => ':valuesが存在しない場合、:attributeは必須です。',
    'required_without_all' => 'いずれの:valuesも存在しない場合、:attributeは必須です。',
    'same' => ':attributeと:otherは一致する必要があります。',
    'size' => [
        'array' => ':attributeは:size個の項目を含む必要があります。',
        'file' => ':attributeは:sizeキロバイトでなければなりません。',
        'numeric' => ':attributeは:sizeでなければなりません。',
        'string' => ':attributeは:size文字でなければなりません。',
    ],
    'starts_with' => ':attributeは次のいずれかで始まらなければなりません: :values。',
    'string' => ':attributeには文字列を指定してください。',
    'timezone' => ':attributeには有効なタイムゾーンを指定してください。',
    'unique' => ':attributeは既に使用されています。',
    'uploaded' => ':attributeのアップロードに失敗しました。',
    'uppercase' => ':attributeは大文字でなければなりません。',
    'url' => ':attributeには有効なURLを指定してください。',
    'ulid' => ':attributeには有効なULIDを指定してください。',
    'uuid' => ':attributeには有効なUUIDを指定してください。',
];

ChatGPT O3-mini-high

ChatGPT O3-mini-high
<?php

return [
    'accepted' => ':attributeを承認してください。',
    'accepted_if' => ':otherが:valueの場合、:attributeを承認してください。',
    'active_url' => ':attributeには有効なURLを指定してください。',
    'after' => ':attributeには:dateより後の日付を指定してください。',
    'after_or_equal' => ':attributeには:date以降の日付を指定してください。',
    'alpha' => ':attributeには英字のみを入力してください。',
    'alpha_dash' => ':attributeには英字、数字、ハイフン、アンダースコアのみを入力してください。',
    'alpha_num' => ':attributeには英字と数字のみを入力してください。',
    'array' => ':attributeには配列を指定してください。',
    'ascii' => ':attributeには半角の英数字および記号のみを使用してください。',
    'before' => ':attributeには:dateより前の日付を指定してください。',
    'before_or_equal' => ':attributeには:date以前の日付を指定してください。',
    'between' => [
        'array' => ':attributeには:minから:max個の項目を指定してください。',
        'file' => ':attributeには:minから:maxキロバイトのサイズにしてください。',
        'numeric' => ':attributeには:minから:maxの値を指定してください。',
        'string' => ':attributeには:minから:max文字で指定してください。',
    ],
    'boolean' => ':attributeにはtrueまたはfalseを指定してください。',
    'can' => ':attributeに不正な値が含まれています。',
    'confirmed' => ':attributeの確認内容が一致していません。',
    'current_password' => '現在のパスワードが正しくありません。',
    'date' => ':attributeには有効な日付を指定してください。',
    'date_equals' => ':attributeには:dateと同じ日付を指定してください。',
    'date_format' => ':attributeは:format形式にしてください。',
    'decimal' => ':attributeは小数点以下:decimal桁にしてください。',
    'declined' => ':attributeを拒否してください。',
    'declined_if' => ':otherが:valueの場合、:attributeを拒否してください。',
    'different' => ':attributeと:otherには異なる値を指定してください。',
    'digits' => ':attributeには:digits桁の数字を指定してください。',
    'digits_between' => ':attributeには:minから:max桁の数字を指定してください。',
    'dimensions' => ':attributeの画像寸法が正しくありません。',
    'distinct' => ':attributeに重複した値が含まれています。',
    'doesnt_end_with' => ':attributeは:valuesのいずれかで終わらないようにしてください。',
    'doesnt_start_with' => ':attributeは:valuesのいずれかで始まらないようにしてください。',
    'email' => ':attributeには有効なメールアドレスを指定してください。',
    'ends_with' => ':attributeは:valuesのいずれかで終わるようにしてください。',
    'enum' => '選択された:attributeは無効です。',
    'exists' => '選択された:attributeは無効です。',
    'extensions' => ':attributeには:valuesのいずれかの拡張子を指定してください。',
    'file' => ':attributeにはファイルを指定してください。',
    'filled' => ':attributeには値を入力してください。',
    'gt' => [
        'array' => ':attributeには:value個より多くの項目を指定してください。',
        'file' => ':attributeは:valueキロバイトより大きいサイズにしてください。',
        'numeric' => ':attributeには:valueより大きな値を指定してください。',
        'string' => ':attributeには:value文字を超える文字数を指定してください。',
    ],
    'gte' => [
        'array' => ':attributeには:value個以上の項目を指定してください。',
        'file' => ':attributeは:valueキロバイト以上のサイズにしてください。',
        'numeric' => ':attributeには:value以上の値を指定してください。',
        'string' => ':attributeには:value文字以上を指定してください。',
    ],
    'hex_color' => ':attributeには有効な16進数カラーコードを指定してください。',
    'image' => ':attributeには画像ファイルを指定してください。',
    'in' => '選択された:attributeは無効です。',
    'in_array' => ':otherに:attributeが存在するようにしてください。',
    'integer' => ':attributeには整数を指定してください。',
    'ip' => ':attributeには有効なIPアドレスを指定してください。',
    'ipv4' => ':attributeには有効なIPv4アドレスを指定してください。',
    'ipv6' => ':attributeには有効なIPv6アドレスを指定してください。',
    'json' => ':attributeには有効なJSON文字列を指定してください。',
    'lowercase' => ':attributeは小文字で指定してください。',
    'lt' => [
        'array' => ':attributeには:value個未満の項目を指定してください。',
        'file' => ':attributeは:valueキロバイト未満のサイズにしてください。',
        'numeric' => ':attributeには:value未満の値を指定してください。',
        'string' => ':attributeには:value文字未満を指定してください。',
    ],
    'lte' => [
        'array' => ':attributeには:value個以下の項目を指定してください。',
        'file' => ':attributeは:valueキロバイト以下のサイズにしてください。',
        'numeric' => ':attributeには:value以下の値を指定してください。',
        'string' => ':attributeには:value文字以下を指定してください。',
    ],
    'mac_address' => ':attributeには有効なMACアドレスを指定してください。',
    'max' => [
        'array' => ':attributeには:max個以下の項目を指定してください。',
        'file' => ':attributeは:maxキロバイト以下のサイズにしてください。',
        'numeric' => ':attributeには:max以下の値を指定してください。',
        'string' => ':attributeには:max文字以下を指定してください。',
    ],
    'max_digits' => ':attributeには:max桁以下の数字を指定してください。',
    'mimes' => ':attributeには:values形式のファイルを指定してください。',
    'mimetypes' => ':attributeには:valuesタイプのファイルを指定してください。',
    'min' => [
        'array' => ':attributeには最低でも:min個の項目を指定してください。',
        'file' => ':attributeは:minキロバイト以上のサイズにしてください。',
        'numeric' => ':attributeには最低でも:min以上の値を指定してください。',
        'string' => ':attributeには:min文字以上を指定してください。',
    ],
    'min_digits' => ':attributeには最低でも:min桁の数字を指定してください。',
    'missing' => ':attributeは存在してはなりません。',
    'missing_if' => ':otherが:valueの場合、:attributeは存在してはなりません。',
    'missing_unless' => ':otherが:valueでない限り、:attributeは存在してはなりません。',
    'missing_with' => ':valuesが存在する場合、:attributeは存在してはなりません。',
    'missing_with_all' => ':valuesが存在する場合、:attributeは存在してはなりません。',
    'multiple_of' => ':attributeには:valueの倍数を指定してください。',
    'not_in' => '選択された:attributeは無効です。',
    'not_regex' => ':attributeの形式が正しくありません。',
    'numeric' => ':attributeには数字を指定してください。',
    'password' => [
        'letters' => ':attributeには少なくとも1文字の英字を含めてください。',
        'mixed' => ':attributeには少なくとも1文字の大文字と1文字の小文字を含めてください。',
        'numbers' => ':attributeには少なくとも1つの数字を含めてください。',
        'symbols' => ':attributeには少なくとも1つの記号を含めてください。',
        'uncompromised' => '入力された:attributeはデータ漏洩により既に使用されています。別の:attributeを選択してください。',
    ],
    'present' => ':attributeは必ず存在してください。',
    'present_if' => ':otherが:valueの場合、:attributeは必ず存在してください。',
    'present_unless' => ':otherが:valueでない限り、:attributeは必ず存在してください。',
    'present_with' => ':valuesが存在する場合、:attributeは必ず存在してください。',
    'present_with_all' => ':valuesが存在する場合、:attributeは必ず存在してください。',
    'prohibited' => ':attributeは使用できません。',
    'prohibited_if' => ':otherが:valueの場合、:attributeは使用できません。',
    'prohibited_unless' => ':otherが:valuesに含まれていない限り、:attributeは使用できません。',
    'prohibits' => ':attributeは:otherの入力を禁止しています。',
    'regex' => ':attributeの形式が正しくありません。',
    'required' => ':attributeは必須項目です。',
    'required_array_keys' => ':attributeには:valuesの項目を含める必要があります。',
    'required_if' => ':otherが:valueの場合、:attributeは必須です。',
    'required_if_accepted' => ':otherが承認された場合、:attributeは必須です。',
    'required_unless' => ':otherが:valuesに含まれていない場合、:attributeは必須です。',
    'required_with' => ':valuesが存在する場合、:attributeは必須です。',
    'required_with_all' => ':valuesが存在する場合、:attributeは必須です。',
    'required_without' => ':valuesが存在しない場合、:attributeは必須です。',
    'required_without_all' => ':valuesのいずれも存在しない場合、:attributeは必須です。',
    'same' => ':attributeは:otherと同じ値を指定してください。',
    'size' => [
        'array' => ':attributeには:size個の項目を指定してください。',
        'file' => ':attributeは:sizeキロバイトのサイズにしてください。',
        'numeric' => ':attributeは:sizeでなければなりません。',
        'string' => ':attributeは:size文字でなければなりません。',
    ],
    'starts_with' => ':attributeは:valuesのいずれかで始めてください。',
    'string' => ':attributeには文字列を指定してください。',
    'timezone' => ':attributeには有効なタイムゾーンを指定してください。',
    'unique' => ':attributeは既に使用されています。',
    'uploaded' => ':attributeのアップロードに失敗しました。',
    'uppercase' => ':attributeは大文字で指定してください。',
    'url' => ':attributeには有効なURLを指定してください。',
    'ulid' => ':attributeには有効なULIDを指定してください。',
    'uuid' => ':attributeには有効なUUIDを指定してください。',
];

o3-miniと比べて日本語的な表現が良い印象はあります。

  • 〇〇ではありません。 → 〇〇を指定してください。
  • 〇〇を含むことができます。 → 〇〇を入力してください。
  • 〇〇を超えてはいけません。 → 〇〇以下の値を指定してください。

Claude 3.7 Sonnet

Claudeは無料版利用なので3.7のみ

Claude 3.7 Sonnet
<?php

return [
    'accepted' => ':attributeを承認してください。',
    'accepted_if' => ':otherが:valueの場合、:attributeを承認してください。',
    'active_url' => ':attributeには有効なURLを指定してください。',
    'after' => ':attributeには:date以降の日付を指定してください。',
    'after_or_equal' => ':attributeには:date以降もしくは同日の日付を指定してください。',
    'alpha' => ':attributeには英字のみを指定してください。',
    'alpha_dash' => ':attributeには英字、数字、ハイフン、アンダースコアのみを指定してください。',
    'alpha_num' => ':attributeには英数字のみを指定してください。',
    'array' => ':attributeには配列を指定してください。',
    'ascii' => ':attributeには半角英数字と記号のみを指定してください。',
    'before' => ':attributeには:date以前の日付を指定してください。',
    'before_or_equal' => ':attributeには:date以前もしくは同日の日付を指定してください。',
    'between' => [
        'array' => ':attributeの項目数は:min個から:max個の間で指定してください。',
        'file' => ':attributeのサイズは:minから:maxキロバイトの間で指定してください。',
        'numeric' => ':attributeには:minから:maxの間の数値を指定してください。',
        'string' => ':attributeの文字数は:min文字から:max文字の間で指定してください。',
    ],
    'boolean' => ':attributeにはtrueかfalseを指定してください。',
    'can' => ':attributeには許可されていない値が含まれています。',
    'confirmed' => ':attributeと確認フィールドが一致していません。',
    'current_password' => 'パスワードが正しくありません。',
    'date' => ':attributeには有効な日付を指定してください。',
    'date_equals' => ':attributeには:dateと同じ日付を指定してください。',
    'date_format' => ':attributeには:format形式の日付を指定してください。',
    'decimal' => ':attributeには:decimal桁の小数を指定してください。',
    'declined' => ':attributeを拒否してください。',
    'declined_if' => ':otherが:valueの場合、:attributeを拒否してください。',
    'different' => ':attributeと:otherには異なる値を指定してください。',
    'digits' => ':attributeには:digits桁の数字を指定してください。',
    'digits_between' => ':attributeには:min桁から:max桁の間の数字を指定してください。',
    'dimensions' => ':attributeの画像サイズが無効です。',
    'distinct' => ':attributeには重複した値が含まれています。',
    'doesnt_end_with' => ':attributeは次のいずれかで終わってはいけません: :values',
    'doesnt_start_with' => ':attributeは次のいずれかで始まってはいけません: :values',
    'email' => ':attributeには有効なメールアドレスを指定してください。',
    'ends_with' => ':attributeは次のいずれかで終わる必要があります: :values',
    'enum' => '選択された:attributeは無効です。',
    'exists' => '選択された:attributeは無効です。',
    'extensions' => ':attributeには次のいずれかの拡張子を指定してください: :values',
    'file' => ':attributeにはファイルを指定してください。',
    'filled' => ':attributeには値を指定してください。',
    'gt' => [
        'array' => ':attributeには:value個より多くの項目を指定してください。',
        'file' => ':attributeには:valueキロバイトより大きいファイルを指定してください。',
        'numeric' => ':attributeには:valueより大きい値を指定してください。',
        'string' => ':attributeには:value文字より多い文字を指定してください。',
    ],
    'gte' => [
        'array' => ':attributeには:value個以上の項目を指定してください。',
        'file' => ':attributeには:valueキロバイト以上のファイルを指定してください。',
        'numeric' => ':attributeには:value以上の値を指定してください。',
        'string' => ':attributeには:value文字以上の文字を指定してください。',
    ],
    'hex_color' => ':attributeには有効な16進数カラーコードを指定してください。',
    'image' => ':attributeには画像ファイルを指定してください。',
    'in' => '選択された:attributeは無効です。',
    'in_array' => ':attributeが:otherに存在していません。',
    'integer' => ':attributeには整数を指定してください。',
    'ip' => ':attributeには有効なIPアドレスを指定してください。',
    'ipv4' => ':attributeには有効なIPv4アドレスを指定してください。',
    'ipv6' => ':attributeには有効なIPv6アドレスを指定してください。',
    'json' => ':attributeには有効なJSON文字列を指定してください。',
    'lowercase' => ':attributeには小文字のみを指定してください。',
    'lt' => [
        'array' => ':attributeには:value個より少ない項目を指定してください。',
        'file' => ':attributeには:valueキロバイトより小さいファイルを指定してください。',
        'numeric' => ':attributeには:valueより小さい値を指定してください。',
        'string' => ':attributeには:value文字より少ない文字を指定してください。',
    ],
    'lte' => [
        'array' => ':attributeには:value個以下の項目を指定してください。',
        'file' => ':attributeには:valueキロバイト以下のファイルを指定してください。',
        'numeric' => ':attributeには:value以下の値を指定してください。',
        'string' => ':attributeには:value文字以下の文字を指定してください。',
    ],
    'mac_address' => ':attributeには有効なMACアドレスを指定してください。',
    'max' => [
        'array' => ':attributeには:max個以下の項目を指定してください。',
        'file' => ':attributeには:maxキロバイト以下のファイルを指定してください。',
        'numeric' => ':attributeには:max以下の数値を指定してください。',
        'string' => ':attributeには:max文字以下の文字を指定してください。',
    ],
    'max_digits' => ':attributeには:max桁以下の数字を指定してください。',
    'mimes' => ':attributeには:valuesタイプのファイルを指定してください。',
    'mimetypes' => ':attributeには:valuesタイプのファイルを指定してください。',
    'min' => [
        'array' => ':attributeには:min個以上の項目を指定してください。',
        'file' => ':attributeには:minキロバイト以上のファイルを指定してください。',
        'numeric' => ':attributeには:min以上の数値を指定してください。',
        'string' => ':attributeには:min文字以上の文字を指定してください。',
    ],
    'min_digits' => ':attributeには:min桁以上の数字を指定してください。',
    'missing' => ':attributeが存在していてはいけません。',
    'missing_if' => ':otherが:valueの場合、:attributeは存在していてはいけません。',
    'missing_unless' => ':otherが:valueでない限り、:attributeは存在していてはいけません。',
    'missing_with' => ':valuesが存在する場合、:attributeは存在していてはいけません。',
    'missing_with_all' => ':valuesが全て存在する場合、:attributeは存在していてはいけません。',
    'multiple_of' => ':attributeは:valueの倍数である必要があります。',
    'not_in' => '選択された:attributeは無効です。',
    'not_regex' => ':attributeの形式が無効です。',
    'numeric' => ':attributeには数値を指定してください。',
    'password' => [
        'letters' => ':attributeには少なくとも1つの文字を含める必要があります。',
        'mixed' => ':attributeには少なくとも大文字と小文字をそれぞれ1つ含める必要があります。',
        'numbers' => ':attributeには少なくとも1つの数字を含める必要があります。',
        'symbols' => ':attributeには少なくとも1つの記号を含める必要があります。',
        'uncompromised' => '指定された:attributeは情報漏洩に含まれています。別の:attributeを選択してください。',
    ],
    'present' => ':attributeが存在している必要があります。',
    'present_if' => ':otherが:valueの場合、:attributeが存在している必要があります。',
    'present_unless' => ':otherが:valueでない限り、:attributeが存在している必要があります。',
    'present_with' => ':valuesが存在する場合、:attributeが存在している必要があります。',
    'present_with_all' => ':valuesが全て存在する場合、:attributeが存在している必要があります。',
    'prohibited' => ':attributeは禁止されています。',
    'prohibited_if' => ':otherが:valueの場合、:attributeは禁止されています。',
    'prohibited_unless' => ':otherが:valuesに含まれていない限り、:attributeは禁止されています。',
    'prohibits' => ':attributeは:otherの存在を禁止しています。',
    'regex' => ':attributeの形式が無効です。',
    'required' => ':attributeは必須項目です。',
    'required_array_keys' => ':attributeには次の項目を含める必要があります: :values',
    'required_if' => ':otherが:valueの場合、:attributeは必須項目です。',
    'required_if_accepted' => ':otherが承認された場合、:attributeは必須項目です。',
    'required_unless' => ':otherが:valuesに含まれていない限り、:attributeは必須項目です。',
    'required_with' => ':valuesが存在する場合、:attributeは必須項目です。',
    'required_with_all' => ':valuesが全て存在する場合、:attributeは必須項目です。',
    'required_without' => ':valuesが存在しない場合、:attributeは必須項目です。',
    'required_without_all' => ':valuesが全て存在しない場合、:attributeは必須項目です。',
    'same' => ':attributeと:otherが一致していません。',
    'size' => [
        'array' => ':attributeには:size個の項目を指定してください。',
        'file' => ':attributeには:sizeキロバイトのファイルを指定してください。',
        'numeric' => ':attributeには:sizeを指定してください。',
        'string' => ':attributeには:size文字の文字を指定してください。',
    ],
    'starts_with' => ':attributeは次のいずれかで始まる必要があります: :values',
    'string' => ':attributeには文字列を指定してください。',
    'timezone' => ':attributeには有効なタイムゾーンを指定してください。',
    'unique' => ':attributeはすでに使用されています。',
    'uploaded' => ':attributeのアップロードに失敗しました。',
    'uppercase' => ':attributeには大文字のみを指定してください。',
    'url' => ':attributeには有効なURLを指定してください。',
    'ulid' => ':attributeには有効なULIDを指定してください。',
    'uuid' => ':attributeには有効なUUIDを指定してください。',
];

o3-mini-highと同等な印象
好みで分かれそうです。

以下はo3-mini-highとの比較です。

ChatGTP:
    'after' => ':attributeには:dateより後の日付を指定してください。',
    'after_or_equal' => ':attributeには:date以降の日付を指定してください。',
Claude:
    'after' => ':attributeには:date以降の日付を指定してください。',
    'after_or_equal' => ':attributeには:date以降もしくは同日の日付を指定してください。',

このメッセージは日本語的にはClaudeが誤りでChatGPTが正しい。

いくつかピックアップしましたが、全体的にはClaudeの方が好みなメッセージ。

ChatGTP:'array' => ':attributeには:minから:max個の項目を指定してください。',
Claude:'array' => ':attributeの項目数は:min個から:max個の間で指定してください。',

ChatGTP:'decimal' => ':attributeは小数点以下:decimal桁にしてください。',
Claude:'decimal' => ':attributeには:decimal桁の小数を指定してください。',

ChatGTP:'lowercase' => ':attributeは小文字で指定してください。',
Claude:'lowercase' => ':attributeには小文字のみを指定してください。',

ChatGTP:'file' => ':attributeは:valueキロバイト以下のサイズにしてください。',
Claude:'file' => ':attributeには:valueキロバイト以下のファイルを指定してください。',

ChatGTP:'letters' => ':attributeには少なくとも1文字の英字を含めてください。',
Claude:'letters' => ':attributeには少なくとも1つの文字を含める必要があります。',

Gemini 2.0 Flash

Gemini 2.0 Flash
<?php

return [
    'accepted' => ':attributeを承認してください。',
    'accepted_if' => ':otherが:valueの場合、:attributeを承認してください。',
    'active_url' => ':attributeは有効なURLである必要があります。',
    'after' => ':attributeは:dateより後の日付である必要があります。',
    'after_or_equal' => ':attributeは:date以降の日付である必要があります。',
    'alpha' => ':attributeは文字のみを含む必要があります。',
    'alpha_dash' => ':attributeは文字、数字、ダッシュ、およびアンダースコアのみを含む必要があります。',
    'alpha_num' => ':attributeは文字と数字のみを含む必要があります。',
    'array' => ':attributeは配列である必要があります。',
    'ascii' => ':attributeはシングルバイトの英数字と記号のみを含む必要があります。',
    'before' => ':attributeは:dateより前の日付である必要があります。',
    'before_or_equal' => ':attributeは:date以前の日付である必要があります。',
    'between' => [
        'array' => ':attributeは:minから:maxのアイテム数である必要があります。',
        'file' => ':attributeは:minから:maxキロバイトの間である必要があります。',
        'numeric' => ':attributeは:minから:maxの間である必要があります。',
        'string' => ':attributeは:minから:max文字の間である必要があります。',
    ],
    'boolean' => ':attributeはtrueまたはfalseである必要があります。',
    'can' => ':attributeには許可されていない値が含まれています。',
    'confirmed' => ':attributeの確認が一致しません。',
    'current_password' => 'パスワードが正しくありません。',
    'date' => ':attributeは有効な日付である必要があります。',
    'date_equals' => ':attributeは:dateと等しい日付である必要があります。',
    'date_format' => ':attributeは形式:formatと一致する必要があります。',
    'decimal' => ':attributeは:decimalの小数点以下桁数である必要があります。',
    'declined' => ':attributeは拒否される必要があります。',
    'declined_if' => ':otherが:valueの場合、:attributeは拒否される必要があります。',
    'different' => ':attributeと:otherは異なる必要があります。',
    'digits' => ':attributeは:digits桁である必要があります。',
    'digits_between' => ':attributeは:minから:max桁の間である必要があります。',
    'dimensions' => ':attributeの画像寸法が無効です。',
    'distinct' => ':attributeに重複した値があります。',
    'doesnt_end_with' => ':attributeは次のいずれかで終わってはいけません: :values。',
    'doesnt_start_with' => ':attributeは次のいずれかで始まってはいけません: :values。',
    'email' => ':attributeは有効なメールアドレスである必要があります。',
    'ends_with' => ':attributeは次のいずれかで終わる必要があります: :values。',
    'enum' => '選択された:attributeは無効です。',
    'exists' => '選択された:attributeは無効です。',
    'extensions' => ':attributeは次のいずれかの拡張子を持つ必要があります: :values。',
    'file' => ':attributeはファイルである必要があります。',
    'filled' => ':attributeには値が必要です。',
    'gt' => [
        'array' => ':attributeは:valueより多いアイテム数である必要があります。',
        'file' => ':attributeは:valueキロバイトより大きい必要があります。',
        'numeric' => ':attributeは:valueより大きい必要があります。',
        'string' => ':attributeは:value文字より大きい必要があります。',
    ],
    'gte' => [
        'array' => ':attributeは:value以上のアイテム数である必要があります。',
        'file' => ':attributeは:valueキロバイト以上である必要があります。',
        'numeric' => ':attributeは:value以上である必要があります。',
        'string' => ':attributeは:value文字以上である必要があります。',
    ],
    'hex_color' => ':attributeは有効な16進数の色である必要があります。',
    'image' => ':attributeは画像である必要があります。',
    'in' => '選択された:attributeは無効です。',
    'in_array' => ':attributeは:otherに存在する必要があります。',
    'integer' => ':attributeは整数である必要があります。',
    'ip' => ':attributeは有効なIPアドレスである必要があります。',
    'ipv4' => ':attributeは有効なIPv4アドレスである必要があります。',
    'ipv6' => ':attributeは有効なIPv6アドレスである必要があります。',
    'json' => ':attributeは有効なJSON文字列である必要があります。',
    'lowercase' => ':attributeは小文字である必要があります。',
    'lt' => [
        'array' => ':attributeは:valueより少ないアイテム数である必要があります。',
        'file' => ':attributeは:valueキロバイトより小さい必要があります。',
        'numeric' => ':attributeは:valueより小さい必要があります。',
        'string' => ':attributeは:value文字より小さい必要があります。',
    ],
    'lte' => [
        'array' => ':attributeは:value以下のアイテム数である必要があります。',
        'file' => ':attributeは:valueキロバイト以下である必要があります。',
        'numeric' => ':attributeは:value以下である必要があります。',
        'string' => ':attributeは:value文字以下である必要があります。',
    ],
    'mac_address' => ':attributeは有効なMACアドレスである必要があります。',
    'max' => [
        'array' => ':attributeは:maxより多いアイテム数であってはいけません。',
        'file' => ':attributeは:maxキロバイトより大きくであってはいけません。',
        'numeric' => ':attributeは:maxより大きくであってはいけません。',
        'string' => ':attributeは:max文字より大きくであってはいけません。',
    ],
    'max_digits' => ':attributeは:max桁より多くであってはいけません。',
    'mimes' => ':attributeは次のタイプのファイルである必要があります: :values。',
    'mimetypes' => ':attributeは次のタイプのファイルである必要があります: :values。',
    'min' => [
        'array' => ':attributeは少なくとも:minアイテム数である必要があります。',
        'file' => ':attributeは少なくとも:minキロバイトである必要があります。',
        'numeric' => ':attributeは少なくとも:minである必要があります。',
        'string' => ':attributeは少なくとも:min文字である必要があります。',
    ],
    'min_digits' => ':attributeは少なくとも:min桁である必要があります。',
    'missing' => ':attributeは存在しない必要があります。',
    'missing_if' => ':otherが:valueの場合、:attributeは存在しない必要があります。',
    'missing_unless' => ':otherが:valueでない場合、:attributeは存在しない必要があります。',
    'missing_with' => ':valuesが存在する場合、:attributeは存在しない必要があります。',
    'missing_with_all' => ':valuesが存在する場合、:attributeは存在しない必要があります。',
    'multiple_of' => ':attributeは:valueの倍数である必要があります。',
    'not_in' => '選択された:attributeは無効です。',
    'not_regex' => ':attributeの形式が無効です。',
    'numeric' => ':attributeは数値である必要があります。',
    'password' => [
        'letters' => ':attributeは少なくとも1つの文字を含む必要があります。',
        'mixed' => ':attributeは少なくとも1つの大文字と1つの小文字を含む必要があります。',
        'numbers' => ':attributeは少なくとも1つの数字を含む必要があります。',
        'symbols' => ':attributeは少なくとも1つの記号を含む必要があります。',
        'uncompromised' => '指定された:attributeはデータ漏洩で出現しました。別の:attributeを選択してください。',
    ],
    'present' => ':attributeは存在する必要があります。',
    'present_if' => ':otherが:valueの場合、:attributeは存在する必要があります。',
    'present_unless' => ':otherが:valueでない場合、:attributeは存在する必要があります。',
    'present_with' => ':valuesが存在する場合、:attributeは存在する必要があります。',
    'present_with_all' => ':valuesが存在する場合、:attributeは存在する必要があります。',
    'prohibited' => ':attributeは禁止されています。',
    'prohibited_if' => ':otherが:valueの場合、:attributeは禁止されています。',
    'prohibited_unless' => ':otherが:valuesに含まれていない場合、:attributeは禁止されています。',
    'prohibits' => ':attributeは:otherが存在することを禁止します。',
    'regex' => ':attributeの形式が無効です。',
    'required' => ':attributeは必須です。',
    'required_array_keys' => ':attribute

    〜〜〜 途中で切れたので続けて出力 〜〜〜
    間の4つほどの項目が飛ばされて、以下出力

    'required_with_all' => ':valuesが存在する場合、:attributeは必須です。',
    'required_without' => ':valuesが存在しない場合、:attributeは必須です。',
    'required_without_all' => ':valuesがすべて存在しない場合、:attributeは必須です。',
    'same' => ':attributeは:otherと一致する必要があります。',
    'size' => [
        'array' => ':attributeは:size個のアイテムを含む必要があります。',
        'file' => ':attributeは:sizeキロバイトである必要があります。',
        'numeric' => ':attributeは:sizeである必要があります。',
        'string' => ':attributeは:size文字である必要があります。',
    ],
    'starts_with' => ':attributeは次のいずれかで始まる必要があります: :values。',
    'string' => ':attributeは文字列である必要があります。',
    'timezone' => ':attributeは有効なタイムゾーンである必要があります。',
    'unique' => ':attributeは既に使用されています。',
    'uploaded' => ':attributeのアップロードに失敗しました。',
    'uppercase' => ':attributeは大文字である必要があります。',
    'url' => ':attributeは有効なURLである必要があります。',
    'ulid' => ':attributeは有効なULIDである必要があります。',
    'uuid' => ':attributeは有効なUUIDである必要があります。',

以外だったのは結果の出力が途中で止まってしまった点。
'required_array_keys'の途中で止まりました。
入力の受付量はダントツだと思っていたので、出力も多いかと思っていました。
文章的には、「〇〇である必要があります。」の形式が多い印象。

Gemini 2.0 Flash Thinking

Gemini 2.0 Flash Thinking
<?php

return [
    'accepted' => ':attributeを承認してください。',
    'accepted_if' => ':otherが:valueの場合、:attributeを承認してください。',
    'active_url' => ':attributeは有効なURLでなければなりません。',
    'after' => ':attributeは:dateより後の日付でなければなりません。',
    'after_or_equal' => ':attributeは:date以降の日付でなければなりません。',
    'alpha' => ':attributeは文字のみを含む必要があります。',
    'alpha_dash' => ':attributeは文字、数字、ダッシュ、およびアンダースコアのみを含む必要があります。',
    'alpha_num' => ':attributeは文字と数字のみを含む必要があります。',
    'array' => ':attributeは配列でなければなりません。',
    'ascii' => ':attributeはシングルバイトの英数字と記号のみを含む必要があります。',
    'before' => ':attributeは:dateより前の日付でなければなりません。',
    'before_or_equal' => ':attributeは:date以前の日付でなければなりません。',
    'between' => [
        'array' => ':attributeは:minから:max個の項目を持つ必要があります。',
        'file' => ':attributeは:minから:maxキロバイトの間でなければなりません。',
        'numeric' => ':attributeは:minから:maxの間でなければなりません。',
        'string' => ':attributeは:minから:max文字の間でなければなりません。',
    ],
    'boolean' => ':attributeはtrueまたはfalseでなければなりません。',
    'can' => ':attributeには許可されていない値が含まれています。',
    'confirmed' => ':attributeの確認が一致しません。',
    'current_password' => 'パスワードが正しくありません。',
    'date' => ':attributeは有効な日付でなければなりません。',
    'date_equals' => ':attributeは:dateと等しい日付でなければなりません。',
    'date_format' => ':attributeは:formatという形式と一致しなければなりません。',
    'decimal' => ':attributeは:decimal桁の小数位を持つ必要があります。',
    'declined' => ':attributeは拒否されなければなりません。',
    'declined_if' => ':otherが:valueの場合、:attributeは拒否されなければなりません。',
    'different' => ':attributeと:otherは異なるものでなければなりません。',
    'digits' => ':attributeは:digits桁でなければなりません。',
    'digits_between' => ':attributeは:minから:max桁の間でなければなりません。',
    'dimensions' => ':attributeの画像サイズが無効です。',
    'distinct' => ':attributeに重複した値があります。',
    'doesnt_end_with' => ':attributeは次のいずれかで終わってはいけません: :values。',
    'doesnt_start_with' => ':attributeは次のいずれかで始まってはいけません: :values。',
    'email' => ':attributeは有効なメールアドレスでなければなりません。',
    'ends_with' => ':attributeは次のいずれかで終わる必要があります: :values。',
    'enum' => '選択された:attributeは無効です。',
    'exists' => '選択された:attributeは無効です。',
    'extensions' => ':attributeは次のいずれかの拡張子を持つ必要があります: :values。',
    'file' => ':attributeはファイルでなければなりません。',
    'filled' => ':attributeには値が必要です。',
    'gt' => [
        'array' => ':attributeは:value個より多くの項目を持つ必要があります。',
        'file' => ':attributeは:valueキロバイトより大きくなければなりません。',
        'numeric' => ':attributeは:valueより大きくなければなりません。',
        'string' => ':attributeは:value文字より大きくなければなりません。',
    ],
    'gte' => [
        'array' => ':attributeは:value個以上の項目を持つ必要があります。',
        'file' => ':attributeは:valueキロバイト以上でなければなりません。',
        'numeric' => ':attributeは:value以上でなければなりません。',
        'string' => ':attributeは:value文字以上でなければなりません。',
    ],
    'hex_color' => ':attributeは有効な16進数の色でなければなりません。',
    'image' => ':attributeは画像でなければなりません。',
    'in' => '選択された:attributeは無効です。',
    'in_array' => ':attributeは:otherに存在する必要があります。',
    'integer' => ':attributeは整数でなければなりません。',
    'ip' => ':attributeは有効なIPアドレスでなければなりません。',
    'ipv4' => ':attributeは有効なIPv4アドレスでなければなりません。',
    'ipv6' => ':attributeは有効なIPv6アドレスでなければなりません。',
    'json' => ':attributeは有効なJSON文字列でなければなりません。',
    'lowercase' => ':attributeは小文字でなければなりません。',
    'lt' => [
        'array' => ':attributeは:value個より少ない項目を持つ必要があります。',
        'file' => ':attributeは:valueキロバイトより小さくなければなりません。',
        'numeric' => ':attributeは:valueより小さくなければなりません。',
        'string' => ':attributeは:value文字より小さくなければなりません。',
    ],
    'lte' => [
        'array' => ':attributeは:value個以下の項目を持つ必要があります。',
        'file' => ':attributeは:valueキロバイト以下でなければなりません。',
        'numeric' => ':attributeは:value以下でなければなりません。',
        'string' => ':attributeは:value文字以下でなければなりません。',
    ],
    'mac_address' => ':attributeは有効なMACアドレスでなければなりません。',
    'max' => [
        'array' => ':attributeは:max個以下の項目を持つ必要があります。',
        'file' => ':attributeは:maxキロバイトを超えてはいけません。',
        'numeric' => ':attributeは:maxを超えてはいけません。',
        'string' => ':attributeは:max文字を超えてはいけません。',
    ],
    'max_digits' => ':attributeは:max桁を超えてはいけません。',
    'mimes' => ':attributeは:valuesタイプのファイルでなければなりません。',
    'mimetypes' => ':attributeは:valuesタイプのファイルでなければなりません。',
    'min' => [
        'array' => ':attributeは少なくとも:min個の項目を持つ必要があります。',
        'file' => ':attributeは少なくとも:minキロバイトでなければなりません。',
        'numeric' => ':attributeは少なくとも:minでなければなりません。',
        'string' => ':attributeは少なくとも:min文字でなければなりません。',
    ],
    'min_digits' => ':attributeは少なくとも:min桁でなければなりません。',
    'missing' => ':attributeは存在していてはいけません。',
    'missing_if' => ':otherが:valueの場合、:attributeは存在していてはいけません。',
    'missing_unless' => ':otherが:valueでない限り、:attributeは存在していてはいけません。',
    'missing_with' => ':valuesが存在する場合、:attributeは存在していてはいけません。',
    'missing_with_all' => ':valuesが存在する場合、:attributeは存在していてはいけません。',
    'multiple_of' => ':attributeは:valueの倍数でなければなりません。',
    'not_in' => '選択された:attributeは無効です。',
    'not_regex' => ':attributeの形式が無効です。',
    'numeric' => ':attributeは数値でなければなりません。',
    'password' => [
        'letters' => ':attributeには少なくとも1つの文字を含める必要があります。',
        'mixed' => ':attributeには少なくとも1つの大文字と1つの小文字を含める必要があります。',
        'numbers' => ':attributeには少なくとも1つの数字を含める必要があります。',
        'symbols' => ':attributeには少なくとも1つの記号を含める必要があります。',
        'uncompromised' => '指定された:attributeはデータ漏洩で確認されています。別の:attributeを選択してください。',
    ],
    'present' => ':attributeは存在している必要があります。',
    'present_if' => ':otherが:valueの場合、:attributeは存在している必要があります。',
    'present_unless' => ':otherが:valueでない限り、:attributeは存在している必要があります。',
    'present_with' => ':valuesが存在する場合、:attributeは存在している必要があります。',
    'present_with_all' => ':valuesが存在する場合、:attributeは存在している必要があります。',
    'prohibited' => ':attributeは禁止されています。',
    'prohibited_if' => ':otherが:valueの場合、:attributeは禁止されています。',
    'prohibited_unless' => ':otherが:valuesに含まれていない限り、:attributeは禁止されています。',
    'prohibits' => ':attributeは:otherが存在することを禁止しています。',
    'regex' => ':attributeの形式が無効です。',
    'required' => ':attributeは必須です。',
    'required_array_keys' => ':attributeには次のキーのエントリが必要です: :values。',
    'required_if' => ':otherが:valueの場合、:attributeは必須です。',
    'required_if_accepted' => ':otherが承認された場合、:attributeは必須です。',
    'required_unless' => ':otherが:valuesに含まれていない限り、:attributeは必須です。',
    'required_with' => ':valuesが存在する場合、:attributeは必須です。',
    'required_with_all' => ':valuesが存在する場合、:attributeは必須です。',
    'required_without' => ':valuesが存在しない場合、:attributeは必須です。',
    'required_without_all' => ':valuesのいずれも存在しない場合、:attributeは必須です。',
    'same' => ':attributeは:otherと一致しなければなりません。',
    'size' => [
        'array' => ':attributeは:size個の項目を含む必要があります。',
        'file' => ':attributeは:sizeキロバイトでなければなりません。',
        'numeric' => ':attributeは:sizeでなければなりません。',
        'string' => ':attributeは:size文字でなければなりません。',
    ],
    'starts_with' => ':attributeは次のいずれかで始まる必要があります: :values。',
    'string' => ':attributeは文字列でなければなりません。',
    'timezone' => ':attributeは有効なタイムゾーンでなければなりません。',
    'unique' => ':attributeはすでに使用されています。',
    'uploaded' => ':attributeのアップロードに失敗しました。',
    'uppercase' => ':attributeは大文字でなければなりません。',
    'url' => ':attributeは有効なURLでなければなりません。',
    'ulid' => ':attributeは有効なULIDでなければなりません。',
    'uuid' => ':attributeは有効なUUIDでなければなりません。',
];

推論モデルなのでやはり表現が向上した印象。
文章的には、「〇〇でなければなりません。」の形式が多い。

DeepSeek-V3

DeepSeek-V3
<?php

return [
    'accepted' => ':attributeを承認してください。',
    'accepted_if' => ':otherが:valueの場合、:attributeを承認してください。',
    'active_url' => ':attributeは有効なURLではありません。',
    'after' => ':attributeは:date以降の日付を指定してください。',
    'after_or_equal' => ':attributeは:date以降または同日の日付を指定してください。',
    'alpha' => ':attributeは英字のみで構成してください。',
    'alpha_dash' => ':attributeは英字、数字、ダッシュ、アンダースコアのみで構成してください。',
    'alpha_num' => ':attributeは英字と数字のみで構成してください。',
    'array' => ':attributeは配列でなければなりません。',
    'ascii' => ':attributeは単一バイトの英数字および記号のみで構成してください。',
    'before' => ':attributeは:date以前の日付を指定してください。',
    'before_or_equal' => ':attributeは:date以前または同日の日付を指定してください。',
    'between' => [
        'array' => ':attributeは:min個から:max個の項目を含んでください。',
        'file' => ':attributeは:min KBから:max KBの間でなければなりません。',
        'numeric' => ':attributeは:minから:maxの間でなければなりません。',
        'string' => ':attributeは:min文字から:max文字の間でなければなりません。',
    ],
    'boolean' => ':attributeはtrueまたはfalseでなければなりません。',
    'can' => ':attributeには許可されていない値が含まれています。',
    'confirmed' => ':attributeの確認が一致しません。',
    'current_password' => 'パスワードが正しくありません。',
    'date' => ':attributeは有効な日付でなければなりません。',
    'date_equals' => ':attributeは:dateと同じ日付でなければなりません。',
    'date_format' => ':attributeは:format形式でなければなりません。',
    'decimal' => ':attributeは:decimal桁の小数でなければなりません。',
    'declined' => ':attributeは拒否されなければなりません。',
    'declined_if' => ':otherが:valueの場合、:attributeは拒否されなければなりません。',
    'different' => ':attributeと:otherは異なる値でなければなりません。',
    'digits' => ':attributeは:digits桁でなければなりません。',
    'digits_between' => ':attributeは:min桁から:max桁の間でなければなりません。',
    'dimensions' => ':attributeの画像サイズが無効です。',
    'distinct' => ':attributeに重複した値があります。',
    'doesnt_end_with' => ':attributeは:valuesで終わってはいけません。',
    'doesnt_start_with' => ':attributeは:valuesで始まってはいけません。',
    'email' => ':attributeは有効なメールアドレスでなければなりません。',
    'ends_with' => ':attributeは:valuesのいずれかで終わらなければなりません。',
    'enum' => '選択された:attributeは無効です。',
    'exists' => '選択された:attributeは無効です。',
    'extensions' => ':attributeは:valuesのいずれかの拡張子でなければなりません。',
    'file' => ':attributeはファイルでなければなりません。',
    'filled' => ':attributeは値を含んでいなければなりません。',
    'gt' => [
        'array' => ':attributeは:value個以上の項目を含んでください。',
        'file' => ':attributeは:value KBより大きくなければなりません。',
        'numeric' => ':attributeは:valueより大きくなければなりません。',
        'string' => ':attributeは:value文字より大きくなければなりません。',
    ],
    'gte' => [
        'array' => ':attributeは:value個以上の項目を含んでください。',
        'file' => ':attributeは:value KB以上でなければなりません。',
        'numeric' => ':attributeは:value以上でなければなりません。',
        'string' => ':attributeは:value文字以上でなければなりません。',
    ],
    'hex_color' => ':attributeは有効な16進数カラーコードでなければなりません。',
    'image' => ':attributeは画像でなければなりません。',
    'in' => '選択された:attributeは無効です。',
    'in_array' => ':attributeは:otherに存在しなければなりません。',
    'integer' => ':attributeは整数でなければなりません。',
    'ip' => ':attributeは有効なIPアドレスでなければなりません。',
    'ipv4' => ':attributeは有効なIPv4アドレスでなければなりません。',
    'ipv6' => ':attributeは有効なIPv6アドレスでなければなりません。',
    'json' => ':attributeは有効なJSON文字列でなければなりません。',
    'lowercase' => ':attributeは小文字でなければなりません。',
    'lt' => [
        'array' => ':attributeは:value個未満の項目を含んでください。',
        'file' => ':attributeは:value KB未満でなければなりません。',
        'numeric' => ':attributeは:value未満でなければなりません。',
        'string' => ':attributeは:value文字未満でなければなりません。',
    ],
    'lte' => [
        'array' => ':attributeは:value個以下の項目を含んでください。',
        'file' => ':attributeは:value KB以下でなければなりません。',
        'numeric' => ':attributeは:value以下でなければなりません。',
        'string' => ':attributeは:value文字以下でなければなりません。',
    ],
    'mac_address' => ':attributeは有効なMACアドレスでなければなりません。',
    'max' => [
        'array' => ':attributeは:max個以下の項目を含んでください。',
        'file' => ':attributeは:max KB以下でなければなりません。',
        'numeric' => ':attributeは:max以下でなければなりません。',
        'string' => ':attributeは:max文字以下でなければなりません。',
    ],
    'max_digits' => ':attributeは:max桁以下でなければなりません。',
    'mimes' => ':attributeは:valuesタイプのファイルでなければなりません。',
    'mimetypes' => ':attributeは:valuesタイプのファイルでなければなりません。',
    'min' => [
        'array' => ':attributeは:min個以上の項目を含んでください。',
        'file' => ':attributeは:min KB以上でなければなりません。',
        'numeric' => ':attributeは:min以上でなければなりません。',
        'string' => ':attributeは:min文字以上でなければなりません。',
    ],
    'min_digits' => ':attributeは:min桁以上でなければなりません。',
    'missing' => ':attributeは存在してはいけません。',
    'missing_if' => ':otherが:valueの場合、:attributeは存在してはいけません。',
    'missing_unless' => ':otherが:valueでない限り、:attributeは存在してはいけません。',
    'missing_with' => ':valuesが存在する場合、:attributeは存在してはいけません。',
    'missing_with_all' => ':valuesがすべて存在する場合、:attributeは存在してはいけません。',
    'multiple_of' => ':attributeは:valueの倍数でなければなりません。',
    'not_in' => '選択された:attributeは無効です。',
    'not_regex' => ':attributeの形式が無効です。',
    'numeric' => ':attributeは数値でなければなりません。',
    'password' => [
        'letters' => ':attributeには少なくとも1文字の英字を含めてください。',
        'mixed' => ':attributeには少なくとも1文字の大文字と1文字の小文字を含めてください。',
        'numbers' => ':attributeには少なくとも1文字の数字を含めてください。',
        'symbols' => ':attributeには少なくとも1文字の記号を含めてください。',
        'uncompromised' => '指定された:attributeはデータ漏洩にさらされています。別の:attributeを選択してください。',
    ],
    'present' => ':attributeは存在しなければなりません。',
    'present_if' => ':otherが:valueの場合、:attributeは存在しなければなりません。',
    'present_unless' => ':otherが:valueでない限り、:attributeは存在しなければなりません。',
    'present_with' => ':valuesが存在する場合、:attributeは存在しなければなりません。',
    'present_with_all' => ':valuesがすべて存在する場合、:attributeは存在しなければなりません。',
    'prohibited' => ':attributeは禁止されています。',
    'prohibited_if' => ':otherが:valueの場合、:attributeは禁止されています。',
    'prohibited_unless' => ':otherが:valuesに含まれていない限り、:attributeは禁止されています。',
    'prohibits' => ':attributeが存在する場合、:otherは存在してはいけません。',
    'regex' => ':attributeの形式が無効です。',
    'required' => ':attributeは必須です。',
    'required_array_keys' => ':attributeには:valuesのエントリを含めてください。',
    'required_if' => ':otherが:valueの場合、:attributeは必須です。',
    'required_if_accepted' => ':otherが承認された場合、:attributeは必須です。',
    'required_unless' => ':otherが:valuesに含まれていない限り、:attributeは必須です。',
    'required_with' => ':valuesが存在する場合、:attributeは必須です。',
    'required_with_all' => ':valuesがすべて存在する場合、:attributeは必須です。',
    'required_without' => ':valuesが存在しない場合、:attributeは必須です。',
    'required_without_all' => ':valuesがすべて存在しない場合、:attributeは必須です。',
    'same' => ':attributeは:otherと一致しなければなりません。',
    'size' => [
        'array' => ':attributeは:size個の項目を含んでください。',
        'file' => ':attributeは:size KBでなければなりません。',
        'numeric' => ':attributeは:sizeでなければなりません。',
        'string' => ':attributeは:size文字でなければなりません。',
    ],
    'starts_with' => ':attributeは:valuesのいずれかで始まらなければなりません。',
    'string' => ':attributeは文字列でなければなりません。',
    'timezone' => ':attributeは有効なタイムゾーンでなければなりません。',
    'unique' => ':attributeは既に使用されています。',
    'uploaded' => ':attributeのアップロードに失敗しました。',
    'uppercase' => ':attributeは大文字でなければなりません。',
    'url' => ':attributeは有効なURLでなければなりません。',
    'ulid' => ':attributeは有効なULIDでなければなりません。',
    'uuid' => ':attributeは有効なUUIDでなければなりません。',
];

文章的には、「〇〇でなければなりません。」の形式が多い。
日付の以降については間違い。数値の以上・より大きい系も表現の誤りあり。

DeepSeek-R1

DeepSeek-R1
return [
    'accepted' => ':attributeを承認してください。',
    'accepted_if' => ':otherが:valueの場合、:attributeを承認してください。',
    'active_url' => ':attributeは有効なURLではありません。',
    'after' => ':attributeは:dateより後の日付を指定してください。',
    'after_or_equal' => ':attributeは:date以降の日付を指定してください。',
    'alpha' => ':attributeは英字のみで入力してください。',
    'alpha_dash' => ':attributeは英数字・ダッシュ(-)・アンダースコア(_)のみで入力してください。',
    'alpha_num' => ':attributeは英数字のみで入力してください。',
    'array' => ':attributeは配列形式で入力してください。',
    'ascii' => ':attributeは半角英数字・記号のみで入力してください。',
    'before' => ':attributeは:dateより前の日付を指定してください。',
    'before_or_equal' => ':attributeは:date以前の日付を指定してください。',
    'between' => [
        'array' => ':attributeは:min~:max個のアイテムを指定してください。',
        'file' => ':attributeは:min~:maxキロバイトで指定してください。',
        'numeric' => ':attributeは:min~:maxの範囲で指定してください。',
        'string' => ':attributeは:min~:max文字で入力してください。',
    ],
    'boolean' => ':attributeは真偽値で指定してください。',
    'can' => ':attributeに許可されていない値が含まれています。',
    'confirmed' => ':attributeの確認入力が一致しません。',
    'current_password' => 'パスワードが正しくありません。',
    'date' => ':attributeは有効な日付ではありません。',
    'date_equals' => ':attributeは:dateと同じ日付を指定してください。',
    'date_format' => ':attributeは:format形式で入力してください。',
    'decimal' => ':attributeは:decimal桁の小数で入力してください。',
    'declined' => ':attributeは拒否してください。',
    'declined_if' => ':otherが:valueの場合、:attributeを拒否してください。',
    'different' => ':attributeと:otherは異なる値を指定してください。',
    'digits' => ':attributeは:digits桁で入力してください。',
    'digits_between' => ':attributeは:min~:max桁で入力してください。',
    'dimensions' => ':attributeの画像サイズが無効です。',
    'distinct' => ':attributeに重複した値が含まれています。',
    'doesnt_end_with' => ':attributeは次のいずれかで終わらないようにしてください: :values。',
    'doesnt_start_with' => ':attributeは次のいずれかで始まらないようにしてください: :values。',
    'email' => ':attributeは有効なメールアドレス形式で入力してください。',
    'ends_with' => ':attributeは次のいずれかで終わる必要があります: :values。',
    'enum' => '選択された:attributeは無効です。',
    'exists' => '選択された:attributeは無効です。',
    'extensions' => ':attributeは次の拡張子のファイルを指定してください: :values。',
    'file' => ':attributeはファイル形式で指定してください。',
    'filled' => ':attributeは必須項目です。',
    'gt' => [
        'array' => ':attributeは:value個より多いアイテムを指定してください。',
        'file' => ':attributeは:valueキロバイトより大きいファイルを指定してください。',
        'numeric' => ':attributeは:valueより大きい値を指定してください。',
        'string' => ':attributeは:value文字より長く入力してください。',
    ],
    'gte' => [
        'array' => ':attributeは:value個以上のアイテムを指定してください。',
        'file' => ':attributeは:valueキロバイト以上のファイルを指定してください。',
        'numeric' => ':attributeは:value以上の値を指定してください。',
        'string' => ':attributeは:value文字以上で入力してください。',
    ],
    'hex_color' => ':attributeは有効な16進数カラーコードで指定してください。',
    'image' => ':attributeは画像ファイルを指定してください。',
    'in' => '選択された:attributeは無効です。',
    'in_array' => ':attributeは:otherに含まれる値を指定してください。',
    'integer' => ':attributeは整数で指定してください。',
    'ip' => ':attributeは有効なIPアドレスで指定してください。',
    'ipv4' => ':attributeは有効なIPv4アドレスで指定してください。',
    'ipv6' => ':attributeは有効なIPv6アドレスで指定してください。',
    'json' => ':attributeは有効なJSON形式で指定してください。',
    'lowercase' => ':attributeは小文字で入力してください。',
    'lt' => [
        'array' => ':attributeは:value個より少ないアイテムを指定してください。',
        'file' => ':attributeは:valueキロバイトより小さいファイルを指定してください。',
        'numeric' => ':attributeは:valueより小さい値を指定してください。',
        'string' => ':attributeは:value文字より短く入力してください。',
    ],
    'lte' => [
        'array' => ':attributeは:value個以下のアイテムを指定してください。',
        'file' => ':attributeは:valueキロバイト以下のファイルを指定してください。',
        'numeric' => ':attributeは:value以下の値を指定してください。',
        'string' => ':attributeは:value文字以下で入力してください。',
    ],
    'mac_address' => ':attributeは有効なMACアドレスで指定してください。',
    'max' => [
        'array' => ':attributeは:max個以下のアイテムを指定してください。',
        'file' => ':attributeは:maxキロバイト以下のファイルを指定してください。',
        'numeric' => ':attributeは:max以下の値を指定してください。',
        'string' => ':attributeは:max文字以下で入力してください。',
    ],
    'max_digits' => ':attributeは:max桁以下で入力してください。',
    'mimes' => ':attributeは:valuesタイプのファイルを指定してください。',
    'mimetypes' => ':attributeは:valuesタイプのファイルを指定してください。',
    'min' => [
        'array' => ':attributeは:min個以上のアイテムを指定してください。',
        'file' => ':attributeは:minキロバイト以上のファイルを指定してください。',
        'numeric' => ':attributeは:min以上の値を指定してください。',
        'string' => ':attributeは:min文字以上で入力してください。',
    ],
    'min_digits' => ':attributeは:min桁以上で入力してください。',
    'missing' => ':attributeは入力しないでください。',
    'missing_if' => ':otherが:valueの場合、:attributeは入力しないでください。',
    'missing_unless' => ':otherが:valueでない場合、:attributeは入力しないでください。',
    'missing_with' => ':valuesが入力されている場合、:attributeは入力しないでください。',
    'missing_with_all' => ':valuesが全て入力されている場合、:attributeは入力しないでください。',
    'multiple_of' => ':attributeは:valueの倍数を指定してください。',
    'not_in' => '選択された:attributeは無効です。',
    'not_regex' => ':attributeの形式が無効です。',
    'numeric' => ':attributeは数値で指定してください。',
    'password' => [
        'letters' => ':attributeには少なくとも1つの英字を含めてください。',
        'mixed' => ':attributeには少なくとも大文字と小文字を1つずつ含めてください。',
        'numbers' => ':attributeには少なくとも1つの数字を含めてください。',
        'symbols' => ':attributeには少なくとも1つの記号を含めてください。',
        'uncompromised' => '入力された:attributeは情報漏洩で検出されています。別の:attributeを指定してください。',
    ],
    'present' => ':attributeは必須項目です。',
    'present_if' => ':otherが:valueの場合、:attributeは必須です。',
    'present_unless' => ':otherが:valueでない場合、:attributeは必須です。',
    'present_with' => ':valuesが入力されている場合、:attributeは必須です。',
    'present_with_all' => ':valuesが全て入力されている場合、:attributeは必須です。',
    'prohibited' => ':attributeは入力できません。',
    'prohibited_if' => ':otherが:valueの場合、:attributeは入力できません。',
    'prohibited_unless' => ':otherが:valuesに含まれていない場合、:attributeは入力できません。',
    'prohibits' => ':attributeが入力されている場合、:otherは入力できません。',
    'regex' => ':attributeの形式が無効です。',
    'required' => ':attributeは必須項目です。',
    'required_array_keys' => ':attributeには:valuesのエントリを含めてください。',
    'required_if' => ':otherが:valueの場合、:attributeは必須です。',
    'required_if_accepted' => ':otherが承認されている場合、:attributeは必須です。',
    'required_unless' => ':otherが:valuesに含まれていない場合、:attributeは必須です。',
    'required_with' => ':valuesが入力されている場合、:attributeは必須です。',
    'required_with_all' => ':valuesが全て入力されている場合、:attributeは必須です。',
    'required_without' => ':valuesが入力されていない場合、:attributeは必須です。',
    'required_without_all' => ':valuesが全て入力されていない場合、:attributeは必須です。',
    'same' => ':attributeと:otherが一致しません。',
    'size' => [
        'array' => ':attributeは:size個のアイテムを指定してください。',
        'file' => ':attributeは:sizeキロバイトのファイルを指定してください。',
        'numeric' => ':attributeは:sizeを指定してください。',
        'string' => ':attributeは:size文字で入力してください。',
    ],
    'starts_with' => ':attributeは次のいずれかで始まる必要があります: :values。',
    'string' => ':attributeは文字列で入力してください。',
    'timezone' => ':attributeは有効なタイムゾーンを指定してください。',
    'unique' => '入力された:attributeは既に使用されています。',
    'uploaded' => ':attributeのアップロードに失敗しました。',
    'uppercase' => ':attributeは大文字で入力してください。',
    'url' => ':attributeは有効なURL形式で入力してください。',
    'ulid' => ':attributeは有効なULID形式で入力してください。',
    'uuid' => ':attributeは有効なUUID形式で入力してください。',
];

日本語的というのもそうですが、エラーメッセージ的に一番ぽいかもしれない。

Claude:'ascii' => ':attributeには半角英数字と記号のみを指定してください。',
DeepSeek-R1:'ascii' => ':attributeは半角英数字・記号のみで入力してください。',

Claude:'present_if' => ':otherが:valueの場合、:attributeが存在している必要があります。',
DeepSeek-R1:'present_if' => ':otherが:valueの場合、:attributeは必須です。',

Claude:'prohibited_unless' => ':otherが:valuesに含まれていない限り、:attributeは禁止されています。',
DeepSeek-R1:'prohibited_unless' => ':otherが:valuesに含まれていない場合、:attributeは入力できません。',

さいごに

概ね2025年に登場したモデルですが、多少の差はありますが、全般的に日本語能力は高い印象でした。
推論モデルの方がやはり伝わりやすい表現だったと感じました。
推論モデルにただの翻訳させるのもどうかと思いましたが、推論モデルの方が手直しせずに採用できる内容を多かったです。
単純な作業だからといって安いモデルに切り替えるよりは推論モデル使う方が生産性が高そう。

OpenAIで今はチャットする際にモデルを選んでいるやり方を自動的に使用するモデルを切り替えてくれる様にする動きがあるようですが、今回の結果を踏まえると出力結果の満足度が下がりかねない懸念もありそうです。

また、DeepSeek-R1の日本語表現力は、ユーザーにとって分かりやすいメッセージという実用面では一番良かったかもしれません。
学習に使われる点を考慮して入力する内容を精査して使う分には使えるという印象。

今回は検証のため時間かかりましたがどれかのモデルを用いて翻訳するのであれば、さくっと終わるので、わざわざ外部パッケージを導入しなくても、十分実用的な日本語バリデーションメッセージが作れることが分かりました。
皆さんもぜひ試してみてください。

Discussion