diff options
Diffstat (limited to 'activemodel/CHANGELOG.md')
-rw-r--r-- | activemodel/CHANGELOG.md | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/activemodel/CHANGELOG.md b/activemodel/CHANGELOG.md index 54fe5794e1..d7e64b8bf0 100644 --- a/activemodel/CHANGELOG.md +++ b/activemodel/CHANGELOG.md @@ -1,3 +1,21 @@ +* Validate multiple contexts on `valid?` and `invalid?` at once. + + Example: + + class Person + include ActiveModel::Validations + + attr_reader :name, :title + validates_presence_of :name, on: :create + validates_presence_of :title, on: :update + end + + person = Person.new + person.valid?([:create, :update]) # => true + person.errors.messages # => {:name=>["can't be blank"], :title=>["can't be blank"]} + + *Dmitry Polushkin* + * Add case_sensitive option for confirmation validator in models. *Akshat Sharma* |