src/Validator/Validator.php
public function laravel($value, $validationString, $messages = [])
    {
        //create validator
        $validator = \Validator::make(['laravel' => $value], ['laravel' => $validationString]);
        $validator->setCustomMessages($this->getMessages());

        // error message management
        if ($validator->fails() && !$this->hasMessage('laravel')) {
            $message = '';
            foreach ( $validator->errors()->get('laravel') as $m) {
                $message .= $m . ' ';
            }
            $this->addMessage('laravel', $message);
        }

        // return validation
        return $validator->valid();
    }
public function laravel($value, $validationString, $messages = [])
    {
        //create validator
        $validator = \Validator::make(['laravel' => $value], ['laravel' => $validationString]);
        $validator->setCustomMessages($this->getMessages());

        // error message management
        if ($validator->fails() && !$this->hasMessage('laravel')) {
            $message = '';
            foreach ( $validator->errors()->get('laravel') as $m) {
                $message .= $m . ' ';
            }
            $this->addMessage('laravel', $message);
        }

        // return validation
        return $validator->valid();
    }
public function laravel ( $ value , $ validationString , $ messages = [ ] ) { //create validator $ validator = \ Validator :: make ( [ 'laravel' => $ value ] , [ 'laravel' => $ validationString ] ) ; $ validator -> setCustomMessages ( $ this -> getMessages ( ) ) ; // error message management if ( $ validator -> fails ( ) && ! $ this -> hasMessage ( 'laravel' ) ) { $ message = '' ; foreach ( $ validator -> errors ( ) -> get ( 'laravel' ) as $ m ) { $ message .= $ m . ' ' ; } $ this -> addMessage ( 'laravel' , $ message ) ; } // return validation return $ validator -> valid ( ) ; }
Return true if the value is correct with a laravel validator string

@param $value
@param $validationString
@param $messages
@return array
Return true if the value is correct with a laravel validator string