Rails 2.0 date validation

Hi all,

Are there any plugins that I can use to validate dates? I know about
Jonathan V.'s plugin,

http://svn.viney.net.nz/things/rails/plugins/validates_date_time/

But it seems that it does not work with Rails 2.0. When I run rake
test:plugins, I get the following stack trace.

./vendor/plugins/validates_date_time/test/…/lib/
validates_date_time.rb:19: warning: already initialized constant
DEFAULT_TEMPORAL_VALIDATION_OPTIONS
./vendor/plugins/validates_date_time/test/…/lib/
validates_date_time.rb:21: superclass mismatch for class Restriction
(TypeError)
from /usr/lib/ruby/1.8/rubygems/custom_require.rb:27:in
gem_original_require' from /usr/lib/ruby/1.8/rubygems/custom_require.rb:27:inrequire’
from /var/lib/gems/1.8/gems/activesupport-2.0.2/lib/
active_support/dependencies.rb:496:in require' from /var/lib/gems/1.8/gems/activesupport-2.0.2/lib/ active_support/dependencies.rb:342:innew_constants_in’
from /var/lib/gems/1.8/gems/activesupport-2.0.2/lib/
active_support/dependencies.rb:496:in require' from ./vendor/plugins/validates_date_time/test/ abstract_unit.rb:17 from /usr/lib/ruby/1.8/rubygems/custom_require.rb:27:ingem_original_require’
from /usr/lib/ruby/1.8/rubygems/custom_require.rb:27:in
require' ... 7 levels... from /var/lib/gems/1.8/gems/activesupport-2.0.2/lib/ active_support/dependencies.rb:489:inload’
from /usr/lib/ruby/1.8/rake/rake_test_loader.rb:5
from /usr/lib/ruby/1.8/rake/rake_test_loader.rb:5:in `each’
from /usr/lib/ruby/1.8/rake/rake_test_loader.rb:5
rake aborted!
Command failed with status (1): [/usr/bin/ruby1.8 -Ilib:test "/usr/lib/
ruby…]

Are there any plugins that I can use? Or am I limited to writing my
own date validations? Thanks!

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs