e x p r e s s i c a

ruby on rails, business and technicalities

No public Twitter messages.

  • RSS
  • Facebook
  • Twitter
  • Linkedin

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 Responses so far.

  1. Gaurav says:

    Thanks for the plugin Sur,
    Its really useful.

  2. Rishav says:

    thx for the plugin … used it rightaway !!!

    ~rd

  3. Akhil Bansal says:

    What the hell is this????

    Why don’t such ideas come to my mind?

    But anyways thanks for the new baby.

  4. sur says:

    Hey guys,

    thanks! :)

  5. random8r says:

    Dude! Thank you SO much. I thought hey I might have to build this, but there ya go you’ve done it :)

    Random8r

  6. HK says:

    Hi Sur,

    The above links for checking out the plugin and more information are not functional.
    Please check.

    Thanks

  7. Sur says:

    Hi Hemant,
    thanks for pointing that out. will fix them now.

  8. James K says:

    Hey,

    Your link to download doesn’t work – it just comes back to the blog post. Can you help? Thanks.

  9. Sur says:

    Hi James,

    You can checkout the plugin from here svn://rubyforge.org/var/svn/expressica/plugins/validate_attributes

    Thanks.


Sponsors