app/Http/Requests/CustomerValidator.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 [
            'fname'=>'required|min:4|max:12|alpha',
            'lname'=>'required|min:4|max:12|alpha',
            'gender'=>'required',
            'dob'=>'required',
            'email'=>'required',
            'phone'=>'required',
            'mobile'=>'required|regex:/^([0-9\s\-\+\(\)]*)$/|min:10',
            'city'=>'required',
            'district'=>'required',
            'permanent_address'=>'required',
            'temporary_address'=>'',
            'customer_type'=>'required',
            'image'=>'required|image'
        ];
    }
public function rules ( ) { return [ 'fname' => 'required|min:4|max:12|alpha' , 'lname' => 'required|min:4|max:12|alpha' , 'gender' => 'required' , 'dob' => 'required' , 'email' => 'required' , 'phone' => 'required' , 'mobile' => 'required|regex:/^([0-9\s\-\+\(\)]*)$/|min:10' , 'city' => 'required' , 'district' => 'required' , 'permanent_address' => 'required' , 'temporary_address' => '' , 'customer_type' => 'required' , 'image' => 'required|image' ] ; }
Get the validation rules that apply to the request.
Get the validation rules that apply to the request .