ORM invalid input for integer: ""

Hi, I have a simple form where is one not required field:

<input type="text" name="user[age]" value="" />

When I'm createing object User from this input:

$user = new User();

$user->assing($_input['user']);

and

$user->save();

then I'm receiving error "invalid input for integer: "" "

I know what's happend but there is some workflow in Phalcon that can avoid that error?

Hi.

I use typecast for data from outside. Something like this:

$_input['user'] = isset($_input['user']) ? intval($_input['user']) : 0