Forum: Ruby on Rails Model warnings along with Validations

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
leonleslie (Guest)
on 2005-11-26 02:15
(Received via mailing list)
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.
This topic is locked and can not be replied to.