app/Http/Requests/EmployeeOtherInfoValidator.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 [
            'staffcode'=>'required',
            'staffname'=>'required',
            'title'=>'required',
            'organisation'=>'',
            'fathername'=>'required|min:8|max:20',
            'mothername'=>'required|min:8|max:20',
            'grandfathername'=>'required|min:8|max:20',
            'parentcontactnumber'=>'required|regex:/^([0-9\s\-\+\(\)]*)$/|min:10',
            'maritalstatus'=>'required',
            'spousename'=>'',
            'emergencyperson'=>'',
            'emergencynumber'=>''
                ];
    }
public function rules ( ) { return [ 'staffcode' => 'required' , 'staffname' => 'required' , 'title' => 'required' , 'organisation' => '' , 'fathername' => 'required|min:8|max:20' , 'mothername' => 'required|min:8|max:20' , 'grandfathername' => 'required|min:8|max:20' , 'parentcontactnumber' => 'required|regex:/^([0-9\s\-\+\(\)]*)$/|min:10' , 'maritalstatus' => 'required' , 'spousename' => '' , 'emergencyperson' => '' , 'emergencynumber' => '' ] ; }
Get the validation rules that apply to the request.
Get the validation rules that apply to the request .