public function validate() { parent::validate(); $this->validateTrue(!empty($this->userIds), 'Select players'); }
public function validateAssociated(Validatable $validatable) { $validatable->validate(); $this->_errors = array_merge($this->getErrorObjects(), $validatable->getErrorObjects()); $this->_errorFields = array_merge($this->_errorFields, $validatable->getErrorFields()); }
public function validate() { parent::validate(); $this->validateUnique($this->values, "error"); }
/** * @test */ public function emptyShouldNotReturnErrorForEmpty() { //given $object = ''; $validatable = new Validatable(); //when $validatable->validateEmpty($object, 'error1'); //then $this->assertEmpty($validatable->getErrors()); }