Email verf. |
[eluser]Lol![/eluser]
Hello! I have the code: Code: <? How I call an email verification at the "* Email" form? See ya!
[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-gui...ation.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.
[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
[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-gui...ation.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).
[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
[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. |
Welcome Guest, Not a member yet? Register Sign In |