<?php

namespace App\Core\Validator\Property;

use App\Core\Repository\Property\PropertyRepository;
use Illuminate\Contracts\Container\Container;
use Illuminate\Contracts\Translation\Translator;

use App\Core\Validator\BaseValidator;

use Exception;

class PropertySearchValidator extends BaseValidator
{
    private $PropertyRepository;

    public function __construct
    (
        PropertyRepository $PropertyRepository,
        Translator $translator,
        Container $container
    )
    {
        parent::__construct($translator, $container);
        $this->PropertyRepository = $PropertyRepository;
    }

    public function rules($params = null)
    {
        return
            [
                'name' => 'required|min:3'
            ];


    }

    public function messages()
    {
        $thisMessages = [];
        return array_merge(parent::messages() , $thisMessages);
    }


    public function validate(array $params, array $rules = [], array $messages = [], array $customAttributes = [])
    {
        return $this->make($params, $this->rules($params), $this->messages());
    }

}
