How to dehydrate FileUpload?

Dehydration is the process which gets data from fields, and transforms it. It runs when you call the form's getState() method.

However, when using $this->form->getState() it triggers the validation that affects the whole form. How to bypass the Form validation (and just validate the current state only) and just get the state value of the file?

FileUpload::make('file')
  ->afterStateUpdated(function(FileUpload $component, $state){
    dd($state);
  });
Was this page helpful?