規約への同意は必須です。
このコミットが含まれているのは:
コミット
4bc6946b1d
|
@ -130,6 +130,11 @@ class ChildrenController extends Controller {
|
|||
return $this->imagememecannull($value);
|
||||
});
|
||||
|
||||
// 規約に同意する
|
||||
Validator::extend('agreed', function ($attribute, $value, $params, $validator) {
|
||||
return $value == 'true';
|
||||
});
|
||||
|
||||
$validate = Validator::make($r->all(), [
|
||||
'identity' => 'required|max:20|alpha_num',
|
||||
'email' => 'required|unique:children|max:255|email',
|
||||
|
@ -138,6 +143,7 @@ class ChildrenController extends Controller {
|
|||
'first_name' => 'required|max:100',
|
||||
'image' => 'image_size|image_meme',
|
||||
'company' => 'max:100',
|
||||
'terms' => 'agreed',
|
||||
]);
|
||||
|
||||
if ($validate->fails()) {
|
||||
|
|
|
@ -165,6 +165,11 @@ class FathersController extends Controller {
|
|||
return $this->imagememecannull($value);
|
||||
});
|
||||
|
||||
// 規約に同意する
|
||||
Validator::extend('agreed', function ($attribute, $value, $params, $validator) {
|
||||
return $value == 'true';
|
||||
});
|
||||
|
||||
$validate = Validator::make($r->all(), [
|
||||
'token' => 'required',
|
||||
'password' => ['required', 'min:8', 'max:72', 'confirmed', new \App\Rules\Hankaku],
|
||||
|
@ -172,6 +177,7 @@ class FathersController extends Controller {
|
|||
'image' => 'image_size|image_meme',
|
||||
'profile' => 'max:1000',
|
||||
'tel' => 'required|unique:fathers|numeric|starts_with:0|tel_size',
|
||||
'terms' => 'agreed',
|
||||
]);
|
||||
|
||||
if ($validate->fails()) {
|
||||
|
|
|
@ -17,6 +17,7 @@ return [
|
|||
'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.',
|
||||
'agreed' => '規約への同意は必須です。',
|
||||
'alpha' => ' :attribute は英文字のみです。',
|
||||
'alpha_dash' => ' :attribute は半角英数字、ハイフン(-)、又はアンダーバー(_)のみです。',
|
||||
'alpha_num' => ' :attribute は半角英数字のみです。',
|
||||
|
|
新しいイシューから参照