I write rest api.
How validate post data into controller?
... $data = $this->request->getJsonRawBody(); ...
What do next?
first see how how $data looks like: var_dump($data)
then write your validation routines or use phalcon's validation facilities...