<?php

namespace App\Http\Requests;

class ApplyJoin extends Request
{
    /**
     * Determine if the user is authorized to make this request.
     *
     * @return bool
     */
    public function authorize()
    {
        return true;
    }

    /**
     * Get the validation rules that apply to the request.
     *
     * @return array
     */
    public function rules()
    {
        return [
            'reason'  => 'required|max:100|min:3',
            'user_id' => 'required|numeric',
        ];
    }

    public function messages()
    {
        return [
            'reason.required' => trans('api.CONTENT_REQUIRED'),
            'reason.max' => trans('api.CONTENT_TOO_LONG'),
            'reason.min' => trans('api.CONTENT_TOO_SHORT'),
        ];
    }
}
