Validation in Zend Framework 2 with Doctrine 2
I am right now getting myself more and more familiar with Zend Framework 2 and in the meantime I was getting myself updated with the validation part in Zend Framework 2. I have seen few examples how to validate the data from the database using Zend Db adapter, for example the code from the Zend Framework 2 official website: //Check that the username is not present in the database $validator = new Zend\Validator\Db\NoRecordExists( array( 'table' => 'users', 'field' => 'username' ) ); if ($validator->isValid($username)) { // username appears to be valid } else { // username is invalid; print the