When I want to use setValidation for form, it doesn't validate elements!
class CustomForm extends Form
public function initialize($entity = null, $options = array())
class CustomValidation extends Validation
public function initialize()
$this->add('name', new PresenceOf([
'message' => 'Name is required'
class IndexController extends Controller
public function testAction()
$customForm = new CustomForm();
$customForm->isValid($this->request->getPost()); // BUG: if you don't post name, this line returns true!
This is current implementation of isValid method. It's just expecting any validators added to elements, if you didnt added anything then nothing will be validated.
So why there is a PUBLIC setter/getter for validation in form.zep!!!
I don't know. I didn't implement this.
Fixed in the 3.0.x branch. Thanks you