「パスワードの半角数のエラーが修正されていないかと思います。」
このコミットが含まれているのは:
コミット
ee3dbf58f1
|
@ -36,7 +36,7 @@ trait AuthenticationTrait {
|
||||||
|
|
||||||
$validate = Validator::make($r->all(), [
|
$validate = Validator::make($r->all(), [
|
||||||
$chk[0] => 'required|'.$chk[2],
|
$chk[0] => 'required|'.$chk[2],
|
||||||
'password' => 'required|min:8|max:72|alpha_num',
|
'password' => ['required', 'min:8', 'max:72', new \App\Rules\Hankaku],
|
||||||
]);
|
]);
|
||||||
|
|
||||||
// バリデーションエラー
|
// バリデーションエラー
|
||||||
|
|
|
@ -126,7 +126,7 @@ class ChildrenController extends Controller {
|
||||||
$validate = Validator::make($r->all(), [
|
$validate = Validator::make($r->all(), [
|
||||||
'identity' => 'required|max:20|alpha_num',
|
'identity' => 'required|max:20|alpha_num',
|
||||||
'email' => 'required|unique:children|max:255|email',
|
'email' => 'required|unique:children|max:255|email',
|
||||||
'password' => 'required|min:8|max:72|confirmed|alpha_num',
|
'password' => ['required', 'min:8', 'max:72', 'confirmed', new \App\Rules\Hankaku],
|
||||||
'last_name' => 'required|max:100',
|
'last_name' => 'required|max:100',
|
||||||
'first_name' => 'required|max:100',
|
'first_name' => 'required|max:100',
|
||||||
'image' => 'image_size|image_meme',
|
'image' => 'image_size|image_meme',
|
||||||
|
@ -529,7 +529,7 @@ class ChildrenController extends Controller {
|
||||||
|
|
||||||
// バリデーションエラー
|
// バリデーションエラー
|
||||||
$validate = Validator::make($r->all(), [
|
$validate = Validator::make($r->all(), [
|
||||||
'password' => 'required|min:8|max:72|confirmed|alpha_num',
|
'password' => ['required', 'min:8', 'max:72', 'confirmed', new \App\Rules\Hankaku],
|
||||||
]);
|
]);
|
||||||
|
|
||||||
if ($validate->fails()) {
|
if ($validate->fails()) {
|
||||||
|
|
|
@ -167,7 +167,7 @@ class FathersController extends Controller {
|
||||||
|
|
||||||
$validate = Validator::make($r->all(), [
|
$validate = Validator::make($r->all(), [
|
||||||
'token' => 'required',
|
'token' => 'required',
|
||||||
'password' => 'required|min:8|max:72|confirmed|alpha_num',
|
'password' => ['required', 'min:8', 'max:72', 'confirmed', new \App\Rules\Hankaku],
|
||||||
'company' => 'required|max:100',
|
'company' => 'required|max:100',
|
||||||
'image' => 'image_size|image_meme',
|
'image' => 'image_size|image_meme',
|
||||||
'profile' => 'max:1000',
|
'profile' => 'max:1000',
|
||||||
|
@ -479,7 +479,7 @@ class FathersController extends Controller {
|
||||||
|
|
||||||
// バリデーションエラー
|
// バリデーションエラー
|
||||||
$validate = Validator::make($r->all(), [
|
$validate = Validator::make($r->all(), [
|
||||||
'password' => 'required|min:8|max:72|confirmed|alpha_num',
|
'password' => ['required', 'min:8', 'max:72', 'confirmed', new \App\Rules\Hankaku],
|
||||||
]);
|
]);
|
||||||
|
|
||||||
if ($validate->fails()) {
|
if ($validate->fails()) {
|
||||||
|
|
|
@ -0,0 +1,19 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Rules;
|
||||||
|
|
||||||
|
use Illuminate\Contracts\Validation\Rule;
|
||||||
|
|
||||||
|
class Hankaku implements Rule {
|
||||||
|
public function __construct () {
|
||||||
|
//
|
||||||
|
}
|
||||||
|
|
||||||
|
public function passes ($attribute, $value) {
|
||||||
|
return preg_match('/^[a-zA-Z0-9]+$/', $value);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function message () {
|
||||||
|
return trans('validation.alpha_num');
|
||||||
|
}
|
||||||
|
}
|
新しいイシューから参照