Support the ongoing development of Laravel.io →
Requests Input Validation
Last updated 1 year ago.
0

From the top of my head, you can manipulate the data on the client side before the sumbit (using jQuery or whatever), and then submit the form using ajax.

Last updated 9 years ago.
0

Thanks for your reply. While that is indeed an option and it is probably the route I will end up going down if I can't find an appropriate solution on the server-side, I'd prefer to solve the issue using this class if possible.

0

Or take a look here, maybe it is the solution you want

https://laracasts.com/discuss/channels/general-discussion/lara...

0

formatInput() has been removed :(

I've had a mess about with it though. Perhaps this could be a solution

public function initialize(array $query = array(), array $request = array(), array $attributes = array(), array $cookies = array(), array $files = array(), array $server = array(), $content = null)
{
    parent::initialize($query, $request, $attributes, $cookies, $files, $server, $content);

    $this->getInputSource()->set('date_of_birth', '');
}
Last updated 9 years ago.
0

The merge method on the request object may work for you.

$request->merge(array('date_of_birth' => implode("-", [$request->year, $request->month, $request->day])));
Last updated 7 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.