Requestに制限をかけることはできましたが、エラー文の表示ができません。
また、Laravelが提供するAuthのエラー文の見た目も綺麗にしたいと思っています。
しかし、どこで見た目をいじればいいのか分からないため困っています。
ご教示して頂けたら幸いです。
宜しくお願い致します。
php
1 2# StoreCommentPostRequest 3 4<?php 5 6namespace App\Http\Requests; 7 8use Illuminate\Foundation\Http\FormRequest; 9 10class StoreCommentPostRequest extends FormRequest { 11 /** 12 * Determine if the user is authorized to make this request. 13 * 14 * @return bool 15 */ 16 public function authorize() { 17 return true; 18 } 19 20 /** 21 * Get the validation rules that apply to the request. 22 * 23 * @return array 24 */ 25 public function rules() { 26 return [ 27 'text' => 'required|max:255', 28 ]; 29 } 30 public function messages() { 31 return [ 32 'text.required' => 'The :attribute field is required.', 33 'text.max:255' => 'The :attribute must be 255 characters or less.', 34 ]; 35 } 36} 37
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2017/02/24 08:30