示例#1
0
 public function validate()
 {
     parent::validate();
     $this->validateTrue(!empty($this->userIds), 'Select players');
 }
示例#2
0
 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");
 }
示例#4
0
 /**
  * @test
  */
 public function emptyShouldNotReturnErrorForEmpty()
 {
     //given
     $object = '';
     $validatable = new Validatable();
     //when
     $validatable->validateEmpty($object, 'error1');
     //then
     $this->assertEmpty($validatable->getErrors());
 }