CodeIgniter Forums
validation callback problem - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forum-5.html)
+--- Forum: General Help (https://forum.codeigniter.com/forum-24.html)
+--- Thread: validation callback problem (/thread-76819.html)



validation callback problem - zuqepife - 06-23-2020

Hello,

I write this bellow, my validation rules arre working, but the callback function not.
I'm new in codeigniter and maybe a little stupid, please help.

Code:
public function add_annonce_do()
    {
        $this->form_validation->set_rules('modele', 'Modèle', 'required');
        $this->form_validation->set_rules('annee', 'Année', 'required|callback_annee_check');
        $this->form_validation->set_rules('km', 'km', 'required');
        $this->form_validation->set_rules('prix', 'Prix', 'required');
        $this->form_validation->set_rules('description', 'Description', 'required');
        if ($this->form_validation->run() == FALSE)
        {
            $this->load->view('admin_header');
            $data['marque']=$this->marque->get_all_marque();
            $data['carburant']=$this->carburant->get_all_carburant();
            $this->load->view('annonce_add_display',$data);
            $this->load->view('admin_footer');
        }
        else
        {
            //traitement du formulaire
            $this->load->view('formsuccess');
        }
       
       

    }
    //callback validation
    public function annee_check($annee)
        {
                $current_year=date('Y');
                if (($annee <= 1870) || ($annee >= $current_year))
                {
                        $this->form_validation->set_message('annee_check', 'L’année n’est pas valide');
                        return FALSE;
                }
                else
                {
                        return TRUE;
                }
        }


Instinctively, my wife reached her free hand up and began pumping him with two, his incredible penis still having room to spare despite her dual stroke. Her paced quickened, her arms propping her own breasts up above the water's surface, droplets cascading down their feminine curvature as William's heavy testicles slapped perversely against the tub.

"Fuck yes." He suddenly grunted.
https://gaypornvideostube.com/en/category/4294967343/Gay/popular/1/
I watched in disbelief as a rope of semen exploded out of the his large, flaring head. An eruption of cum began launching outward and across the top of Samantha's tits, coating her jiggling breasts and hard nipples with thick splatters of ejaculate. It was impossible to describe the moment. My wife flinched as one strand caught her on her cheek, though she continued to massage his length, pumping Williams cock with her bottom lip bitten, as every last bit of him splashed across her naked body.

Finally, eventually, the large man stopped his orgasmic convulsion, grunting. My wife slowly relinquished her grasp on his tool, which bobbed powerfully in the nights air as if it was hungry for more. Samantha's eyes were still in a daze. "My- goodness. That's a lot of cum." She spoke, voice raspy, while cupping her breasts from beneath.

"Damn. I needed that." William chuckled, leaning back and bracing himself with his large arms, adding, "Thank you both." Again, to him, it seemed as if this scenario was the most normal thing in the world, like it should have been expected.

Samantha turned away from him, slowly striding up the stairs and onto the deck, "I need to clean up." She offered, dazed, her senses still not fully returned. I watched in a stupor as she escaped into the house, water falling from her half naked body.

I slowly stood, wanting to follow, wanting to speak with her. I realized that my dick was still rock solid, my own soaked boxers jutting outwards in less than impressive fashion. It was such a confusing moment in time.

William was matter of fact upon noticing, "First time letting her do something like that?" He asked.

I nodded, "Absolutely." It was bizarre how something could seem like both the strangest and most normal thing in the world, all at once.

He was strangely kind, though his undercurrent of authority was not lost either, "Don't beat yourself up about it John. It's common."

"You've done this sort of thing before?" I managed.

He nodded, casually.
https://thefreegaysex.com/
I was unsure of how to respond. I took another step out of the tub and onto our deck. I finally managed, "I should go see how she's doing. This is new to us."

"Understandable. I'm sure she's fine." William replied, shuffling his large frame into the hot tub. He looked up at me, adding, with absurd ease, "I'd like to take her to bed John. I think I could show her a great time, and her eyes are telling me that she wants it, bad." He sort of nodded towards his penis, making it clear as to what it was exactly that my wife wanted.


RE: validation callback problem - InsiteFX - 06-24-2020

Look at the two words annee and Annee one of the e's has an accent above it.

Which makes the two words different.