0
郎問題刀片
"Min_UserName" => "Min :chars chars for username",
JQuery的
$("form#registerForm").validate({
rules: {
UserName: {
required: true,
minlength: 6
}
},
messages: {
UserName: {
required: "{!! trans('Register.Required_UserName') !!}",
minlength: "{!! trans('Register.Min_UserName',
['chars' => '\App\UserMinValue::Min_UserName']) !!}"
}
}
});
類
namespace App\Architecture\MinMaxValues;
class UserMinValue {
const Min_UserName = 6;
}
電流輸出
minlength: "Min App\UserMinValue::Min_UserName chars for username",
期望輸出
minlength: "Min 6 chars for username",
我錯過了什麼?