refactor: update validation rules in BuketRequest for request_khusus and deskripsi fields
This commit is contained in:
parent
dfc1dd3e3a
commit
78f0860076
|
|
@ -17,13 +17,13 @@ public function authorize(): bool
|
|||
public function rules(): array
|
||||
{
|
||||
return [
|
||||
//tmbah requirement
|
||||
'nama' => 'required|string|min:3|max:100',
|
||||
'ukuran' => 'required|in:S,M,L',
|
||||
'kategori' => 'required|in:single,fresh,premium_fresh,artificial',
|
||||
'harga' => 'required|numeric|min:0',
|
||||
'request_khusus' => 'nullable|string|max:255',
|
||||
'deskripsi' => 'required|string|min:10',
|
||||
// Dinamis: required jika store (POST), nullable jika update (PUT)
|
||||
'request_khusus' => 'required|string|max:100',
|
||||
'deskripsi' => 'required|string|min:100',
|
||||
'foto' => $this->isMethod('post')
|
||||
? 'required|image|mimes:jpeg,png,jpg|max:2048'
|
||||
: 'nullable|image|mimes:jpeg,png,jpg|max:2048',
|
||||
|
|
|
|||
Loading…
Reference in New Issue