Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

laravel-data & Livewire #669

Merged
merged 8 commits into from
Mar 1, 2024
Merged

laravel-data & Livewire #669

merged 8 commits into from
Mar 1, 2024

Conversation

rubenvanassche
Copy link
Member

A set of changes to make laravel-data and Livewire work better together, very wip

@ju5t
Copy link

ju5t commented Feb 27, 2024

Would you consider adding validation too? If possible, it would also be awesome if we can validate nested data. Something along the lines of:

public AlbumData $album;

public function save()
{
    $this->album->validate();
    //
}

Our plan is to use data objects instead of Livewire's form objects so we can reuse it in our upcoming API.

@rubenvanassche
Copy link
Member Author

At the moment, no. Since we do not support validating objects themselves, only payloads creating data objects can be valdiated.

@ju5t
Copy link

ju5t commented Mar 1, 2024

@rubenvanassche how would data validation work when this is implemented? Will there be no validation or are you validating data before the data object gets updated?

@rubenvanassche
Copy link
Member Author

No validation, it is at the moment technically not possible to provide correct validation objects. You'll need to implement it yourself.

@rubenvanassche rubenvanassche marked this pull request as ready for review March 1, 2024 13:45
@rubenvanassche rubenvanassche merged commit 605626a into main Mar 1, 2024
24 checks passed
@rubenvanassche rubenvanassche deleted the data-for-livewire branch March 1, 2024 13:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants