Model warnings along with Validations


#1

Hi railers,

Is there a simple method to extend Active Record to have similar
functionality as the validate functions e.g.

validate_on_find
validates_acceptance_of
validates_each
validates_format_of
validates_length_of
validates_uniqueness_of
etc…

but only report warning on model attributes instead of errors().

I would like to save the model if there are warning and if the model is
invalid (there are errors) do not save.

maybe functions like:

warn_on_find
warn_acceptance_of
warn_each
warn_format_of
warn_length_of
warn_uniqueness_of

two Example of usage in my present project:

  1. I am migrating a legacy application with tons of validation errors
    and
    would like to hit the user that there is a problem.
  2. To help a legal examiner identify possible problems (e.g
    formation_date >
    today)

Any help will be greatly appreciated.