Email verf. - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: Email verf. (/showthread.php?tid=1761) |
Email verf. - El Forum - 06-25-2007 [eluser]Lol![/eluser] Hello! I have the code: Code: <? How I call an email verification at the "* Email" form? See ya! Email verf. - El Forum - 06-25-2007 [eluser]optimal[/eluser] Hello, There's sample code for server-side validation under the "Validation Class" User Guide topic, located here: http://ellislab.com/codeigniter/user-guide/libraries/validation.html In particular you'll probably want to use the "valid_email" rule discussed there. If that's not sufficient, the "Callbacks" section describes custom validation. Email verf. - El Forum - 06-25-2007 [eluser]Lol![/eluser] <?=$this->validation->error_string; ?> $rules['email'] = "required|valid_email"; $this->validation->set_rules($rules); I need use this lines, right? sorry for questions, 'cause I can't test, I need upload just one time the file in the FTP server. - I was thinking in implementate just one javascript code, to verify the form value, and if isn't an email on the form it don't submit form. Is it possible? ps; sorry for bad english, ma english su*ks xD Email verf. - El Forum - 06-25-2007 [eluser]optimal[/eluser] That's part of the solution. There's complete sample code in the "Setting Validation Rules" section located here: http://ellislab.com/codeigniter/user-guide/libraries/validation.html As it explains, after calling set_rules() you can check the output of $this->validation->run(). Or as you said you could just handle it in JavaScript (which you'll need to code separately and requires users to have JavaScript enabled). Email verf. - El Forum - 06-29-2007 [eluser]Lol![/eluser] My htmls uses some javascripts, and it alerts to turn JS on. How I use javascript to verify email form? I know regex, but i dunno how implementate it on codeigniter forms. Help me, please xD Email verf. - El Forum - 07-02-2007 [eluser]Lol![/eluser] Nobody? How I use javascripts to verify email form? Email verf. - El Forum - 07-02-2007 [eluser]Iksander[/eluser] Why would you use Javascript to validate an email form? The Validation library handles it very nicely for you, and very simply. |