I would like to inform the users about attribute validation conditions for form fields using title as in <span title= "cannot be blank" >. The simplest way would be to use the validation error messages already defined in the models, but I cannot find any way to retrieve these messages, when no error has been made. The methods I have tried as errors.full_messages only returns the messages for errors that have been made -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
On Jul 22, 8:43 am, Hans Marmolin <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> I would like to inform the users about attribute validation conditions > for form fields using title as in <span title= "cannot be blank" >. > ...Try using the validation_reflection plugin. http://www.schuerig.de/michael/rails/validation_reflection/ Dan Manges http://www.dcmanges.com --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Hans Marmolin
2007-Jul-26 12:02 UTC
Re: Retrieving validation messages without making errors
Dan Manges wrote:> On Jul 22, 8:43 am, Hans Marmolin <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> > wrote: >> I would like to inform the users about attribute validation conditions >> for form fields using title as in <span title= "cannot be blank" >. >> ... > > Try using the validation_reflection plugin. > http://www.schuerig.de/michael/rails/validation_reflection/ > > Dan Manges > http://www.dcmanges.comThanks Thats will solve my problem, I think. I will test it soon -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
what about... <%= error_message_on ("model name
here","title") %>
On Jul 22, 1:43 pm, Hans Marmolin
<rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org>
wrote:> I would like to inform the users about attribute validation conditions
> for form fields using title as in <span title= "cannot be
blank" >.
> The simplest way would be to use the validation error messages already
> defined in the models, but I cannot find any way to retrieve these
> messages, when no error has been made. The methods I have tried
aserrors.full_messages only returns the messages forerrorsthat have been
> made
> --
> Posted viahttp://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---