Textinput validate convert int to string

protected function handleRecordUpdate(Model $record, array $data): Model
{

dd($this->validate());
protected function handleRecordUpdate(Model $record, array $data): Model
{

dd($this->validate());
php When I do a dd($data) it returns the TextInput fields as int, but if I pass it $this->validate() it converts them to string?
2 Replies
Mohamed Ayaou
Mohamed Ayaou2d ago
maybe prefix it with (int) ?
Daniel Reales
Daniel RealesOP5h ago
What I don't understand is why $this->form->getState() validates the form and doesn't convert it to a string but $this->validate validates and converts it to a string.

Did you find this page helpful?