John W. Long wrote:
On Dec 21, 2007, at 11:34 PM, Maged M. wrote:
Does anyone knows if normal ROR validation could be done inside of
Radiant extensions. I’ve tried regular ROR validation methods like
validates_presence_of inside of my model but it does’t work. Does
anyone
have an idea on how to do that.
Validation is a feature of ActiveRecord so it should work flawlessly
in a Radiant extension. Do you need to restart your mongrels? Do you
have a parse error in your models?
–
John L.
http://wiseheartdesign.com
It didn’t give me any errors in the console and I restarted the server
That’s what the console looks like preparing my submit
**
Processing AutoController#auto (for 127.0.0.1 at 2007-12-22 13:58:21)
[POST]
Session ID: a0297b2553d2c1ab1c7b036fcb6782af
Parameters: {“commit”=>“Next”, “action”=>“auto”,
“contact”=>{“address1”=>“”, “city”=>“”, “work_phone”=>“”,
“license_state”=>“”, “address2”=>“”, “zip”=>“”,
“birth_date(1i)”=>“2007”, “birth_date(2i)”=>“12”,
“birth_date(3i)”=>“22”, “country”=>“USA”, “cell_phone”=>“”,
“marital_status”=>“Single”, “home_phone”=>“”, “middle_initial”=>“E”,
“first_name”=>“”, “last_name”=>“Makled”, “social_number”=>“”,
“email”=>“”, “driver_license”=>“”, “state”=>“”}, “controller”=>“auto”}
**
and my model
**
class Contact < ActiveRecord::Base
validates_presence_of :first_name
**
any help will be appreciated.
Thanks
Maged M.