Why cannot I use allow_blank together with_options?

Hi there,

I was using it on 4.1.7, but when I upgrade to 4.2.5 it does not work more :frowning:

with_options allow_blank: true do |v|


allow_blank doesn’t included here: https://github.com/rails/rails/blob/master/activemodel/lib/active_model/validations.rb#L90

Is there a reason?


That is not what with_options is for, it is for grouping conditional
validations. Show us the rest of the validation so we can see what
you are trying to do.