diff --git a/app/Http/Requests/User/BookingFotoRequest.php b/app/Http/Requests/User/BookingFotoRequest.php index 701ed04..4d663da 100644 --- a/app/Http/Requests/User/BookingFotoRequest.php +++ b/app/Http/Requests/User/BookingFotoRequest.php @@ -17,7 +17,7 @@ public function rules(): array 'id_paket' => 'required|exists:paket_fotos,id_paket', 'tgl_booking' => 'required|date|after_or_equal:today', 'jam_mulai' => 'required', - 'nama' => 'required|string|min:3|max:100', + 'nama' => 'required|string|min:3|max:100|regex:/^[a-zA-Z\s]+$/', 'no_wa' => 'required|numeric|digits_between:10,15', 'bukti_bayar' => 'required|image|mimes:jpeg,png,jpg|max:2048', ]; @@ -37,6 +37,7 @@ public function messages(): array 'after_or_equal' => ':attribute tidak boleh tanggal yang sudah lewat.', 'mimes' => 'Format :attribute harus jpeg, png, atau jpg.', 'bukti_bayar.max' => 'Ukuran :attribute maksimal adalah 2MB.', + 'regex' => ':attribute hanya boleh berisi huruf dan spasi.', ]; }