app/Http/Requests/StaffValidator.php
/**
     * Get the validation rules that apply to the request.
     *
     * @return array
     */
Get the validation rules that apply to the request.
@return array
Get the validation rules that apply to the request . @return array
public function rules()
    {
        return [
            'employee_id'=>'required',
            'fname'=>'required|min:4|max:12|alpha',
            'lname'=>'required|min:4|max:12|alpha',
            'gender'=>'required',
            'dob'=>'required',
            'email'=>'required',
            'phoneno'=>'required',
            'mobileno'=>'required|regex:/^([0-9\s\-\+\(\)]*)$/|min:10',
            'city'=>'required',
            'district'=>'required',
            'permanent_address'=>'required',
            'temporary_address'=>'required',
            'photo'=>'required|image',
            'department_id'=>'required',
            'title_id'=>'required',
            'level_id'=>'required',
            'panno'=>'required',
            'joined_date'=>'required'
        ];
    }
public function rules ( ) { return [ 'employee_id' => 'required' , 'fname' => 'required|min:4|max:12|alpha' , 'lname' => 'required|min:4|max:12|alpha' , 'gender' => 'required' , 'dob' => 'required' , 'email' => 'required' , 'phoneno' => 'required' , 'mobileno' => 'required|regex:/^([0-9\s\-\+\(\)]*)$/|min:10' , 'city' => 'required' , 'district' => 'required' , 'permanent_address' => 'required' , 'temporary_address' => 'required' , 'photo' => 'required|image' , 'department_id' => 'required' , 'title_id' => 'required' , 'level_id' => 'required' , 'panno' => 'required' , 'joined_date' => 'required' ] ; }
Get the validation rules that apply to the request.
Get the validation rules that apply to the request .