Rails: Almost Automatic Client-Side Validation
Posted in JavaScript, Rails, Ruby on December 15th, 2006 21 Comments »
Ruby on Rails already does a good job of specifying almost declaratively what conditions objects must meet to be considered valid–that is, how they are validated. Thus, in order to make sure that a Person’s last_name attribute does not exceed 100 characters, you would write something like this class Person < ActiveRecord::Base validates_length_of :last_name, :maximum [...]
