You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Here's a Volt component to make testing this easier. The first input has the mask and the second doesn't. If you click the update button you will see phone_number_masked is an empty string and phone_number is null.
@devfaysal thanks for reporting! Turns out this wasn't an issue in Flux but instead it was a problem in Alpine's x-mask plugin. I've submitted a PR to Alpine with a fix alpinejs/alpine#4481. So going to close this issue.
Flux Version v1.0.24
Laravel Version 11.33.2
The phone number is an empty string when submitted without writing anything in the input
"" // app/Livewire/Test.php:16
If I remove the mask then it returns null
null // app/Livewire/Test.php:16
As Laravel uses
convertEmptyStringsToNull
by default, the null should be the correct value if the input does not have anything.But the masking is doing something wrong.
The text was updated successfully, but these errors were encountered: