Validating object inside object

How I can validate an object from $this->request->getPost() that has inside other object? For example:

In AJAX data:
{ "something": { "value" : "someValue" } }

In server:
$validator->add("value", ...)


I'm trying a workaround sending a JSON.stringify(...) instead of an Object of Objects, but the validator always success in the validation, even with very different values.

edited Sep '14

Im afraid you have to create custom validation to validate your object

you can follow this guide to make your custome validation


I think I'll be using a string for that little thing (custom validator will be more work than).

THe problem is that I had discovered that everything I send to validate (for that object), even in a string form (1#a$2#b) returns true, no matter what the pattern is (and the vars are setted correctly).


Well, I think this can't go worse.

It seems that Phalcon validates OK everything I send, no matter what. And I'm doing the validation the same as in the login, and there I don't have fails.