public static function validateByCallback($paramName, array $data,
                                              array $params)
    {
        if (isset($params['callback'])) {
            return $params['callback']($paramName, $data);
        } else {
            throw new \Exception('Callback parameter is required');
        }
    }
public static function validateByCallback($paramName, array $data,
                                              array $params)
    {
        if (isset($params['callback'])) {
            return $params['callback']($paramName, $data);
        } else {
            throw new \Exception('Callback parameter is required');
        }
    }
public static function validateByCallback ( $ paramName , array $ data , array $ params ) { if ( isset ( $ params [ 'callback' ] ) ) { return $ params [ 'callback' ] ( $ paramName , $ data ) ; } else { throw new \ Exception ( 'Callback parameter is required' ) ; } }
Validate by user function

@param string $paramName
@param mixed $data
@param array $params
@return mixed
@throws \Exception
Validate by user function