app/Http/Requests/TeacherValidator.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',
            'batch'=>'required',
            'course'=>'required',
            'email'=>'required',
            'image'=>'required|image',
            'phone'=>'required|regex:/^([0-9\s\-\+\(\)]*)$/|min:10',
            'teachtime'=>'required',
             'teachcat'=>'required',
             'address'=>'required'
        ];
    }
public function rules ( ) { return [ 'fname' => 'required|min:4|max:12|alpha' , 'lname' => 'required|min:4|max:12|alpha' , 'batch' => 'required' , 'course' => 'required' , 'email' => 'required' , 'image' => 'required|image' , 'phone' => 'required|regex:/^([0-9\s\-\+\(\)]*)$/|min:10' , 'teachtime' => 'required' , 'teachcat' => 'required' , 'address' => 'required' ] ; }
Get the validation rules that apply to the request.
Get the validation rules that apply to the request .