FragmentedValidation allows your model to only validate selected attributes.
Add this line to your application's Gemfile:
gem 'fragmented_validation'
And then execute:
$ bundle
Or install it yourself as:
$ gem install fragmented_validation
class User < ActiveRecord::Base
fragmented_validation
end
person.valid_email?
person.fragmented_validation_on(:username, :email)
or
person.fragmented_validation_except(:password)
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Added some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request