0
votes

is it possible to prevent closing a modal if control in the handle method is not valid in Nova Action?

Or, alternatively, is it possible to check value field with the value of another field?

Example. 2 fields year and event_date

if($fields->year <> Carbon::parse($fields->event_date)->format('Y'))
  return Action::danger("Message");

This control close modal while rule control on single field prevent close modal

1

1 Answers

0
votes

maybe you can try validate fields() on action before to execute in handle() method.

Date::make('Year')->rules('required', 'date'),

hope it will help you.