Here's a giant list of everything available in Livewire.
It's possible to validate a user's upload in real-time, BEFORE they press "submit". After a user chooses a file, you may want to show them a preview of that file BEFORE they submit the form and actually store the file. Instructs Livewire to not update the element or its children when updating the DOM from a server request. Read Full Documentation.
For more information on Laravel's File Validation utilities, visit the documentation.
Here's an example of a file upload that handles multiple uploads: Like you've seen in previous examples, validating file uploads with Livewire is exactly the same as handling file uploads from a standard Laravel controller.
Read Docs: WithFileUploads: This trait enables adding wire:model to an input of type="file". Livewire handles multiple file uploads automatically by detecting the multiple attribute on the tag.
By default, Livewire will validate ALL temporary file uploads with the following rules: file|max:12288 (Must be a file less than 12MB). The "self" modifier restricts updates to the element itself, but allows modifications to its children. This saves drastically on server roundtrips. This temporary directory will fill up with files quickly, therefore, it's important to configure S3 to cleanup files older than 24 hours. Lazily syncs the input with its corresponding component property at rest. You can, Emit an event to all Livewire components listening on a page, Listen for an event to be emitted from a component, Boot Livewire on the page (done for you automatically via, Re-scan the DOM for newly added Livewire components, An element is about to be updated after a Livewire request, An element has just been updated from a Livewire request, An element has been removed after a Livewire request, A new Livewire message was just sent to the server, A message has been received (but hasn't affected the DOM), A message has been fully received and implemented (DOM updates, etc...), Called on subsequent Livewire requests after the component has been hydrated, but before any other action occurs, Called when a Livewire component is newed up (think of it like a constructor), Called after the "foo" property has been updated, Called after the nested "bar" key on the "foo" property has been updated, Called before "dehydrate" and renders the Blade view for the component.
It's possible to validate a user's upload in real-time, BEFORE they press "submit". Note: Your Livewire version must be >= 1.2.0 to use this feature.