Changeset [05d6c8f0ee8a0e7426c4b7640cc1865b35d1bb29] by Dan Kubb

November 10th, 2009 @ 03:40 PM

[dm-validations] Add :allow_blank option to validators

  • Refactored logic testing allow_nil and allow_blank
  • Refactored #call methods for validators to use a private #valid? method when possible, that performs the validator and returns true/false.

[#935] [#1058 state:resolved] http://github.com/datamapper/dm-more/commit/05d6c8f0ee8a0e7426c4b76...

Committed by Dan Kubb

  • M dm-validations/lib/dm-validations/validators/acceptance_validator.rb
  • M dm-validations/lib/dm-validations/validators/confirmation_validator.rb
  • M dm-validations/lib/dm-validations/validators/format_validator.rb
  • M dm-validations/lib/dm-validations/validators/generic_validator.rb
  • M dm-validations/lib/dm-validations/validators/length_validator.rb
  • M dm-validations/lib/dm-validations/validators/numeric_validator.rb
  • M dm-validations/lib/dm-validations/validators/uniqueness_validator.rb
  • M dm-validations/lib/dm-validations/validators/within_validator.rb
  • M dm-validations/spec/fixtures/beta_tester_account.rb
  • M dm-validations/spec/fixtures/bill_of_landing.rb
  • M dm-validations/spec/fixtures/reservation.rb
New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »