Ouzo\Validatable::getErrors PHP Method

getErrors() public method

public getErrors ( )
    public function getErrors()
    {
        return Arrays::map($this->_errors, Functions::extractField('message'));
    }

Usage Example

示例#1
0
 /**
  * @test
  */
 public function emptyShouldNotReturnErrorForEmpty()
 {
     //given
     $object = '';
     $validatable = new Validatable();
     //when
     $validatable->validateEmpty($object, 'error1');
     //then
     $this->assertEmpty($validatable->getErrors());
 }