before_validation(*args, &block) public

No documentation

This method has no description. You can help the Ruby on Rails community by adding new notes.

Hide source
# File activemodel/lib/active_model/validations/callbacks.rb, line 30
        def before_validation(*args, &block)
          options = args.last
          if options.is_a?(Hash) && options[:on]
            options[:if] = Array.wrap(options[:if])
            options[:if].unshift("self.validation_context == :#{options[:on]}")
          end
          set_callback(:validation, :before, *args, &block)
        end
Register or log in to add new notes.