diff --git a/app/Http/Requests/CreatePirepRequest.php b/app/Http/Requests/CreatePirepRequest.php index 9f66d7df..b8d4f22f 100644 --- a/app/Http/Requests/CreatePirepRequest.php +++ b/app/Http/Requests/CreatePirepRequest.php @@ -39,15 +39,15 @@ class CreatePirepRequest extends FormRequest $field_rules = Pirep::$rules; - $field_rules['hours'] = 'nullable|integer'; - $field_rules['minutes'] = 'nullable|integer'; + $field_rules['hours'] = 'required|integer'; + $field_rules['minutes'] = 'required|integer'; // Add the validation rules for the custom fields $pirepFieldRepo = app(PirepFieldRepository::class); $custom_fields = $pirepFieldRepo->all(); foreach ($custom_fields as $field) { - Log::info('field:', $field->toArray()); + // Log::info('field:', $field->toArray()); $field_rules[$field->slug] = $field->required ? 'required' : 'nullable'; } diff --git a/app/Http/Requests/UpdatePirepRequest.php b/app/Http/Requests/UpdatePirepRequest.php index 29fd0ebe..56e1530a 100644 --- a/app/Http/Requests/UpdatePirepRequest.php +++ b/app/Http/Requests/UpdatePirepRequest.php @@ -39,8 +39,8 @@ class UpdatePirepRequest extends FormRequest $field_rules = Pirep::$rules; - $field_rules['hours'] = 'nullable|integer'; - $field_rules['minutes'] = 'nullable|integer'; + $field_rules['hours'] = 'required|integer'; + $field_rules['minutes'] = 'required|integer'; // Add the validation rules for the custom fields $pirepFieldRepo = app(PirepFieldRepository::class);