Hi all,
I found an answer(a tweak) to the question which was pinging my mind while working on my current project that How to validate one or more specific attribute of the model(field of the table i mean)?, as the requirement was to save a record after validating the model’s object through 4 steps ie. 4 different forms. Although i found something in the Rails API to put some step constraints on the validations in the model, but i didn’t find it that much flexible so i wrote a snippet which validates one or more specific attributes and can also save the record on the basis of validating specific attributes. Then i thought to pluginize it, as it might be useful
Check out the plugin Validate Attributes
It provides a simple way to validate specific attribute(s) unlike the function valid? which collectively validates all the attributes.
For more information about the plugin regarding SVN repository, usage, example please visit here
If you like/dislike the plugin or if you have some issue/conflict, please do not forget to post a comment.
9 Comments to "Plugin: Validate Attributes - validate one or more specific attributes"
Please share your thoughts
Filed in: plugin, rails, ror, ruby, rubyonrails, validate_attributes


Thanks for the plugin Sur,
Its really useful.
thx for the plugin … used it rightaway !!!
~rd
What the hell is this????
Why don’t such ideas come to my mind?
But anyways thanks for the new baby.
Hey guys,
thanks!
Dude! Thank you SO much. I thought hey I might have to build this, but there ya go you’ve done it
Random8r
Hi Sur,
The above links for checking out the plugin and more information are not functional.
Please check.
Thanks
Hi Hemant,
thanks for pointing that out. will fix them now.
Hey,
Your link to download doesn’t work - it just comes back to the blog post. Can you help? Thanks.
Hi James,
You can checkout the plugin from here svn://rubyforge.org/var/svn/expressica/plugins/validate_attributes
Thanks.