File tree Expand file tree Collapse file tree 1 file changed +25
-0
lines changed Expand file tree Collapse file tree 1 file changed +25
-0
lines changed Original file line number Diff line number Diff line change @@ -491,6 +491,31 @@ Please refer to the [Changelog][active-model] for detailed changes.
491
491
492
492
# ## Notable changes
493
493
494
+ * Add support for infinite ranges to `LengthValidator`s `:in`/`:within` options.
495
+
496
+ ` ` ` ruby
497
+ validates_length_of :first_name, in: ..30
498
+ ` ` `
499
+
500
+ * Add support for beginless ranges to `inclusivity/exclusivity` validators.
501
+
502
+ ` ` ` ruby
503
+ validates_inclusion_of :birth_date, in: -> { (..Date.today) }
504
+ ` ` `
505
+
506
+ * Add support for password challenges to `has_secure_password`. When set, validate that the password
507
+ challenge matches the persisted `password_digest`.
508
+
509
+ * Allow validators to accept lambdas without record argument.
510
+
511
+ ` ` ` ruby
512
+ # Before
513
+ validates_comparison_of :birth_date, less_than_or_equal_to: ->(_record) { Date.today }
514
+
515
+ # After
516
+ validates_comparison_of :birth_date, less_than_or_equal_to: -> { Date.today }
517
+ ` ` `
518
+
494
519
Active Support
495
520
--------------
496
521
You can’t perform that action at this time.
0 commit comments