SitePoint Sponsor

User Tag List

Results 1 to 5 of 5

Hybrid View

  1. #1
    SitePoint Evangelist
    Join Date
    Apr 2005
    Posts
    485
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    ruby form validation and generation class?

    do any good ones exist? i will miss my php forms class that validates my form input (js and server), allows easy regex checking, allows linked selects, allows basic js (eg, background color) and a lot more.

    does ruby have anything similar?

    the license is important, too. i think i'm looking for something bsd or lgpl.

    it will go into a commercial product, if all goes well.

  2. #2
    SitePoint Enthusiast
    Join Date
    Aug 2004
    Location
    FL
    Posts
    72
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Rails offers some incredible validation methods. To take full advantage, i'd recommend picing up "Agile Development with Rails". There are several methods that you can work with for validation.
    Eric A.
    Founder and CEO, XMG Networks, Inc.
    XMG Services: Web 2.0 Photo Management and Sharing | Web Hosting
    Personal Blog: From Two 2 Twelve

  3. #3
    SitePoint Guru silver trophy Luke Redpath's Avatar
    Join Date
    Mar 2003
    Location
    London
    Posts
    794
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Rails doesn't come with anything to handle client-side validation, but server-side validation is handled by your model validation and as Eric says Rails has a lot of great built-in validation macros which makes most validation tasks a breeze.

  4. #4
    ☆★☆★ silver trophy vgarcia's Avatar
    Join Date
    Jan 2002
    Location
    in transition
    Posts
    21,235
    Mentioned
    1 Post(s)
    Tagged
    1 Thread(s)
    Rails has extremely easy server-side validation (validates_presence_of, validates_format_of, validates_length_of, etc.) that allow for checking of all kinds of criteria.

    As for client-side validation, I just built a FormValidator object based on the included prototype.js framework, but I hardly ever use it.

  5. #5
    SitePoint Evangelist
    Join Date
    Apr 2005
    Posts
    485
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    well, i guess it is time to jump right in then!

    i won't know if there are any big problems unless i try.

    thanks for the information. i look forward to putting my rubies on rails.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •