public function rules()
    {
        $attributes = [
            'title' => 'required',
            'text'  => 'required',
        ];

        $rules = $this->buildLocalizedRules($attributes);

        return array_merge($rules, [
            'id'           => 'exists:site_pages,id',
            'slug'         => 'required|alpha_dash|unique:site_pages,slug,'.$this->route('sites'),
            'published_at' => 'date',
            'concealed_at' => 'date',
        ]);
    }
public function rules()
    {
        $attributes = [
            'title' => 'required',
            'text'  => 'required',
        ];

        $rules = $this->buildLocalizedRules($attributes);

        return array_merge($rules, [
            'id'           => 'exists:site_pages,id',
            'slug'         => 'required|alpha_dash|unique:site_pages,slug,'.$this->route('sites'),
            'published_at' => 'date',
            'concealed_at' => 'date',
        ]);
    }
public function rules ( ) { $ attributes = [ 'title' => 'required' , 'text' => 'required' , ] ; $ rules = $ this -> buildLocalizedRules ( $ attributes ) ; return array_merge ( $ rules , [ 'id' => 'exists:site_pages,id' , 'slug' => 'required|alpha_dash|unique:site_pages,slug,' . $ this -> route ( 'sites' ) , 'published_at' => 'date' , 'concealed_at' => 'date' , ] ) ; }
validation that has to pass.

@return array
validation that has to pass .