Open BRGustavoRibeiro opened 7 months ago
Tenho o mesmo problema, resolvi adicionando no meu EditCustomer o seguinte:
protected function mutateFormDataBeforeSave(array $data): array
{
$data['document_number'] = preg_replace('/\D/', '', $data['document_number']);
return $data;
}
What happened?
I expected _cpf_orcnpj field to save data on the database without the mask, and the
dehydrateMask()
method should be available in case I wanted to save the info with the mask.How to reproduce the bug
Fill a _cpf_orcnpj field. Save it. Check it on the database - it is saved as
111.111.111-11
instead of11111111111
Package Version
3.0.1
PHP Version
8.2.0
Laravel Version
10.3.3
Which operating systems does with happen with?
Windows
Notes
No response