public function getValidationMessage($attribute, $rule, $data = [], $type = null)
    {
        $path = Str::snake($rule);
        if ($type !== null) {
            $path .= '.' . $type;
        }

        if ($this->translator->has('validation.custom.' . $attribute . '.' . $path)) {
            $path = 'custom.' . $attribute . '.' . $path;
        }

        $niceName = $this->getValidationAttribute($attribute);

        return $this->translator->get('validation.' . $path, $data + ['attribute' => $niceName]);
    }
public function getValidationMessage($attribute, $rule, $data = [], $type = null)
    {
        $path = Str::snake($rule);
        if ($type !== null) {
            $path .= '.' . $type;
        }

        if ($this->translator->has('validation.custom.' . $attribute . '.' . $path)) {
            $path = 'custom.' . $attribute . '.' . $path;
        }

        $niceName = $this->getValidationAttribute($attribute);

        return $this->translator->get('validation.' . $path, $data + ['attribute' => $niceName]);
    }
public function getValidationMessage ( $ attribute , $ rule , $ data = [ ] , $ type = null ) { $ path = Str :: snake ( $ rule ) ; if ( $ type !== null ) { $ path .= '.' . $ type ; } if ( $ this -> translator -> has ( 'validation.custom.' . $ attribute . '.' . $ path ) ) { $ path = 'custom.' . $ attribute . '.' . $ path ; } $ niceName = $ this -> getValidationAttribute ( $ attribute ) ; return $ this -> translator -> get ( 'validation.' . $ path , $ data + [ 'attribute' => $ niceName ] ) ; }
Get user friendly validation message.

@param string $attribute
@param string $rule
@param array $data
@param string $type
@return string
@see Illuminate\Validation\Validator::getMessage()
Get user friendly validation message .