src/Validation/Validator.php
private function parseData(array $data)
    {
        $field = $data['field'];

        foreach ($data['policies'] as $rule => $policy) {
            $passes = call_user_func_array([new Rule(), $rule], [$field, $data['value'], $policy]);

            if (!$passes) {
                ErrorHandler::set(
                    str_replace(
                        [':attribute', ':policy', '_'],
                        [$field, $policy, ' '], $this->messages[$rule]), $field
                );
            }
        }
    }
private function parseData(array $data)
    {
        $field = $data['field'];

        foreach ($data['policies'] as $rule => $policy) {
            $passes = call_user_func_array([new Rule(), $rule], [$field, $data['value'], $policy]);

            if (!$passes) {
                ErrorHandler::set(
                    str_replace(
                        [':attribute', ':policy', '_'],
                        [$field, $policy, ' '], $this->messages[$rule]), $field
                );
            }
        }
    }
private function parseData ( array $ data ) { $ field = $ data [ 'field' ] ; foreach ( $ data [ 'policies' ] as $ rule => $ policy ) { $ passes = call_user_func_array ( [ new Rule ( ) , $ rule ] , [ $ field , $ data [ 'value' ] , $ policy ] ) ; if ( ! $ passes ) { ErrorHandler :: set ( str_replace ( [ ':attribute' , ':policy' , '_' ] , [ $ field , $ policy , ' ' ] , $ this -> messages [ $ rule ] ) , $ field ) ; } } }
Perform validation for the data provider and set error messages.

@param array $data
Perform validation for the data provider and set error messages .