Donnie Jones
2006-Jan-02 21:59 UTC
[Rails] Rails db model validation with separate web forms, help.
Hello, I have a DB model that has many columns and I would like to separate the input from the user into web forms on many pages to not overburden the user with entering a lot of info on one page. However, I can''t figure out how to handle the validation of the user''s input... I would like to validate each piece of data on each form page before the user is allowed to move on to the next form page. Is it possible to only validate part of a DB model? Currently, I plan to save the user''s input in a session until all of the data iss available to save to the database, which would allow me to validate the user''s input upon saving to the database, but would not easily allow me to direct the user back to the form page where an error occurs... Any suggestions would be great, even if it requires some re-design. Thank you. __ Donnie
Donnie Jones
2006-Jan-02 22:07 UTC
[Rails] Rails db model validation with separate web forms, help.
Hello, So far this is the only documentation for multi-page forms and validation that I have been able to find: http://wiki.rubyonrails.com/rails/pages/HowToBuildMultiStageForms/versions/2 Thanks. __ Donnie On Mon, 2 Jan 2006, Donnie Jones wrote:> Hello, > > I have a DB model that has many columns and I would like to separate the > input from the user into web forms on many pages to not overburden the user > with entering a lot of info on one page. > > However, I can''t figure out how to handle the validation of the user''s > input... I would like to validate each piece of data on each form page > before the user is allowed to move on to the next form page. > Is it possible to only validate part of a DB model? > > Currently, I plan to save the user''s input in a session until all of the data > iss available to save to the database, which would allow me to validate the > user''s input upon saving to the database, but would not easily allow me to > direct the user back to the form page where an error occurs... > > Any suggestions would be great, even if it requires some re-design. > Thank you. > __ > Donnie > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails >
Josh | Vectrice
2006-Jan-03 07:05 UTC
[Rails] Rails db model validation with separate web forms, help.
I think that this plugin can help you. http://rubyforge.org/projects/validator/ Look at svn repository ----- Original Message ----- From: "Donnie Jones" <donnie@darthik.com> To: <rails@lists.rubyonrails.org> Sent: Monday, January 02, 2006 10:59 PM Subject: [Rails] Rails db model validation with separate web forms, help.> Hello, > > I have a DB model that has many columns and I would like to separate the > input from the user into web forms on many pages to not overburden the > user with entering a lot of info on one page. > > However, I can''t figure out how to handle the validation of the user''s > input... I would like to validate each piece of data on each form page > before the user is allowed to move on to the next form page. > Is it possible to only validate part of a DB model? > > Currently, I plan to save the user''s input in a session until all of the > data iss available to save to the database, which would allow me to > validate the user''s input upon saving to the database, but would not > easily allow me to direct the user back to the form page where an error > occurs... > > Any suggestions would be great, even if it requires some re-design. > Thank you. > __ > Donnie > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails >