app/Http/Controllers/Auth/RegisterTutorController.php
/**
     * Get a validator for an incoming registration request.
     *
     * @param  array  $data
     * @return \Illuminate\Contracts\Validation\Validator
     */
Get a validator for an incoming registration request.
@param  array  $data
@return \Illuminate\Contracts\Validation\Validator
Get a validator for an incoming registration request . @param array $data @return \ Illuminate \ Contracts \ Validation \ Validator
protected function validator(array $data)
    {
        $validator = Validator::make($data, [
            'fname'                 => ['required', 'string', 'max:255'],
            'lname'                 => ['required', 'string', 'max:255'],
            'email'                 => ['required', 'string', 'email', 'max:255', 'unique:users'],
            'password'              => ['required', 'string', 'min:1', 'confirmed'],
            'home_phone'            => ['required', 'string'],
            'cell_phone'            => ['required', 'string'],
            'address'               => ['required', 'string'],
            'city'                  => ['required', 'string'],
            'state_id'              => ['required', 'integer'],
            'pcode'                 => ['required', 'string'],
            'country_id'            => ['required', 'integer'],
            'other_notes'           => ['required', 'string'],
            'post_secondary_edu'    => ['required', 'string'],
            'area_of_concentration' => ['required', 'string'],
            'tutoring_courses'      => ['required', 'string'],
            'work_experience'       => ['required', 'string'],
            'tutoring_areas'        => ['required', 'string'],
            'sex_val'               => ['required', 'string'],
            'certified'             => ['required', 'string'],
            'cr_radio'              => ['required', 'string'],
            'cc_radio'              => ['required', 'string'],
        ]);
        if ($validator->fails()) {
            session()->flash('error', $validator->messages()->first());
        }
        return $validator;
    }
protected function validator ( array $ data ) { $ validator = Validator :: make ( $ data , [ 'fname' => [ 'required' , 'string' , 'max:255' ] , 'lname' => [ 'required' , 'string' , 'max:255' ] , 'email' => [ 'required' , 'string' , 'email' , 'max:255' , 'unique:users' ] , 'password' => [ 'required' , 'string' , 'min:1' , 'confirmed' ] , 'home_phone' => [ 'required' , 'string' ] , 'cell_phone' => [ 'required' , 'string' ] , 'address' => [ 'required' , 'string' ] , 'city' => [ 'required' , 'string' ] , 'state_id' => [ 'required' , 'integer' ] , 'pcode' => [ 'required' , 'string' ] , 'country_id' => [ 'required' , 'integer' ] , 'other_notes' => [ 'required' , 'string' ] , 'post_secondary_edu' => [ 'required' , 'string' ] , 'area_of_concentration' => [ 'required' , 'string' ] , 'tutoring_courses' => [ 'required' , 'string' ] , 'work_experience' => [ 'required' , 'string' ] , 'tutoring_areas' => [ 'required' , 'string' ] , 'sex_val' => [ 'required' , 'string' ] , 'certified' => [ 'required' , 'string' ] , 'cr_radio' => [ 'required' , 'string' ] , 'cc_radio' => [ 'required' , 'string' ] , ] ) ; if ( $ validator -> fails ( ) ) { session ( ) -> flash ( 'error' , $ validator -> messages ( ) -> first ( ) ) ; } return $ validator ; }
Get a validator for an incoming registration request.
Get a validator for an incoming registration request .