Email validation in controller


#1

hi all ,

i want to check/validate email in controller, with out using model . plz
some one help me out.

thx in advance


#2

On Thu, Apr 16, 2009 at 3:39 PM, Hamid R.
removed_email_address@domain.invalid wrote:

hi all ,

i want to check/validate email in controller, with out using model . plz
some one help me out.

thx in advance

Just use a regular expression, it could be as simple as
if params[:email] =~ /@/
…valid…
end

Andrew T.
http://ramblingsonrails.com
http://www.linkedin.com/in/andrewtimberlake

“I have never let my schooling interfere with my education” - Mark Twain