W3Cschool
恭喜您成為首批注冊用戶
獲得88經(jīng)驗值獎勵
如果您想要將錯誤信息中的 :attribute
部分替換為自定義的屬性名稱,您可以在 resources/lang/xx/validation.php
語言文件中的 attributes
屬性數(shù)組中指定自定義名稱以實現(xiàn):
'attributes' => [
'email' => 'email address',
],
您亦可通過將自定義屬性作為 Validator::make
的第四個參數(shù)傳遞給它來實現(xiàn):
$customAttributes = [
'email' => 'email address',
];
$validator = Validator::make($input, $rules, $messages, $customAttributes);
Copyright©2021 w3cschool編程獅|閩ICP備15016281號-3|閩公網(wǎng)安備35020302033924號
違法和不良信息舉報電話:173-0602-2364|舉報郵箱:jubao@eeedong.com
掃描二維碼
下載編程獅App
編程獅公眾號
聯(lián)系方式:
更多建議: