Closed Rubioli closed 7 years ago
This is easy. Your proc returns a boolean value if the entry should be rejected. So for both fields it could look like this:
reject_if: proc { |attributes| attributes['sort_order'].blank? && attributes['title'].blank? }
Great Thanks
In my application I am Rejecting nested form if my
sort_order
attribute is blank.reject_if: proc { |attributes| attributes['sort_order'].blank? }
How can I make is so I can reject only IF when Both
sort_order
ANDtitle
is blank?Thanks in advanced!