We have moved our forum to GitHub Discussions. For questions about Phalcon v3/v4/v5 you can visit here and for Phalcon v6 here.

Validation post data the controller

I write rest api.

How validate post data into controller?

...
$data = $this->request->getJsonRawBody();
...

What do next?



43.9k
edited Jun '14

first see how how $data looks like: var_dump($data)

then write your validation routines or use phalcon's validation facilities...