Has anyone been able to succssesfuly use the Respect Validation library with an Idiorm result object? It appears as though Respect Validation will only work on vanilla, not sure if that's the correct term, objects. Idiorm result objects allow you to access attributes by using $user->name but when you var_dump the object it's obviously just mapped to work like an object with attributes but isn't actually a straight object.
Excerpt from a dump below
object(ORM)[47]
protected '_data' =>
array (size=9)
'id' => string '100000' (length=6)
'name' => string 'test' (length=4)
The code below always fails because Respect Validation can't access the attribute through a reference. Is there a way around this? It would be great to use the objects as is and not have to convert them to arrays.
$user= ORM::for_table('user')->find_one(5);
$userValidator = v::attribute('name', v::string()->length(1,32));
$userValidator->validate($user);