protected function validateMappedValues(array $data)
    {
        $errors = [];

        foreach (array_diff_key($this->properties, [ ':any_name:' => 1 ]) as $key => $property) {
            $result = $this->selectValue($property, $data);
            if ($result instanceof Ok) {
                $value = $result->unwrap();
                if ($value === null) {
                    continue;
                }
                $result = $property->validate($value);
            }
            if ($result instanceof Error) {
                $errors[$key] = $result->unwrap();
            }
        }

        return empty($errors) ? Ok::unit() : Error::unit($errors);
    }
protected function validateMappedValues(array $data)
    {
        $errors = [];

        foreach (array_diff_key($this->properties, [ ':any_name:' => 1 ]) as $key => $property) {
            $result = $this->selectValue($property, $data);
            if ($result instanceof Ok) {
                $value = $result->unwrap();
                if ($value === null) {
                    continue;
                }
                $result = $property->validate($value);
            }
            if ($result instanceof Error) {
                $errors[$key] = $result->unwrap();
            }
        }

        return empty($errors) ? Ok::unit() : Error::unit($errors);
    }
protected function validateMappedValues ( array $ data ) { $ errors = [ ] ; foreach ( array_diff_key ( $ this -> properties , [ ':any_name:' => 1 ] ) as $ key => $ property ) { $ result = $ this -> selectValue ( $ property , $ data ) ; if ( $ result instanceof Ok ) { $ value = $ result -> unwrap ( ) ; if ( $ value === null ) { continue ; } $ result = $ property -> validate ( $ value ) ; } if ( $ result instanceof Error ) { $ errors [ $ key ] = $ result -> unwrap ( ) ; } } return empty ( $ errors ) ? Ok :: unit ( ) : Error :: unit ( $ errors ) ; }
Validates the values of all explicitly defined schema properties.

@param array $data

@return ResultInterface
Validates the values of all explicitly defined schema properties .