Wixel/GUMP — pull request #26 by headzoo (2013-12-09 17:49:58+00:00)
Title: Fixed validating "required" on non-scalar values

Validating with the "required" rule fails when the field value is non-scalar, eg an object or array. The bug seems to be caused by passing the field value through trim() without first checking if the value may be cast to a string.

Recreating the error:
```php
$gump = new GUMP();
$gump->validation_rules([
"name" => "required",
"address" => "required"
]);

// The "address" field fails validation because the field value is an object.
$values = [
"name" => "headzoo",
"address" => new stdClass()
];
$is_valid = $gump->run($values);
```