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 @@ -515,6 +515,31 @@ Please refer to the [Changelog][active-model] for detailed changes.
515
515
516
516
# ## Notable changes
517
517
518
+ * Add support for infinite ranges to `LengthValidator`s `:in`/`:within` options.
519
+
520
+ ` ` ` ruby
521
+ validates_length_of :first_name, in: ..30
522
+ ` ` `
523
+
524
+ * Add support for beginless ranges to `inclusivity/exclusivity` validators.
525
+
526
+ ` ` ` ruby
527
+ validates_inclusion_of :birth_date, in: -> { (..Date.today) }
528
+ ` ` `
529
+
530
+ * Add support for password challenges to `has_secure_password`. When set, validate that the password
531
+ challenge matches the persisted `password_digest`.
532
+
533
+ * Allow validators to accept lambdas without record argument.
534
+
535
+ ` ` ` ruby
536
+ # Before
537
+ validates_comparison_of :birth_date, less_than_or_equal_to: ->(_record) { Date.today }
538
+
539
+ # After
540
+ validates_comparison_of :birth_date, less_than_or_equal_to: -> { Date.today }
541
+ ` ` `
542
+
518
543
Active Support
519
544
--------------
520
545
You can’t perform that action at this time.
0 commit comments