fix: member due period validation

This commit is contained in:
2026-05-11 18:57:05 +00:00
parent c56ecb941c
commit 18832d27c5
@@ -19,6 +19,8 @@ class MemberDueForm
->searchable()->required(), ->searchable()->required(),
TextInput::make('period')->label('Periode (YYYY-MM)') TextInput::make('period')->label('Periode (YYYY-MM)')
->placeholder(now()->format('Y-m')) ->placeholder(now()->format('Y-m'))
->rules(['regex:/^\d{4}-(0[1-9]|1[0-2])$/'])
->validationMessages(['regex' => 'Format periode harus YYYY-MM (contoh: 2026-05).'])
->required(), ->required(),
TextInput::make('amount')->label('Jumlah (Rp)')->numeric()->required(), TextInput::make('amount')->label('Jumlah (Rp)')->numeric()->required(),
Select::make('status')->options(['lunas' => 'Lunas', 'belum' => 'Belum Lunas']) Select::make('status')->options(['lunas' => 'Lunas', 'belum' => 'Belum Lunas'])