[eluser]OverZealous[/eluser] @NachoF
DMZ provides all of the tools - but you still have to make the application. Like I said, there's no way for DMZ to know the difference between "empty string that is supposed to be NULL" and "empty string that is supposed to be an empty string".
If you want to accept values that need to be modified, use validation rules. That's what they are there for.
In my case, for different reasons, I added a null_on_empty rule to my base class. It looks something like this:
Code:
function _null_on_empty($field) {
if(empty($this->{$field})) {
$this->{$field} = NULL;
}
}