Hello, This question might look pretty "noobish", so, please, excuse me if it is. :)
I have a form which is being validated by a standard Mojolicious::Validator::Validation <http://mojolicio.us/perldoc/Mojolicious/Validator/Validation>->check. Something like that: sub submit { my $self = shift; $self->validation->required('email')->size(3, 254); if($self->validation->has_error) { $self->redirect_to(action => 'form'); } else { ### $self->redirect_to(action => 'thanks'); } } If I use the "redirect_to" method the "email" field (which is being generated by the corresponding tag-helper) doesn't get the "field-with-error" class and it doesn't contain the "bad" value. Although, when I use the "render" method, it works fine. To be honest, I feel myself pretty awkward when I'm proceeding some action and need to render a template intended for some another action. I'd rather redirect user to the corresponding action, but in this case I lose abovesaid advantages of using the "render" method. :( So, the question is: can I make it work with the "redirect_to" method? Or shall I just use the "render" method and stop worrying? :) Thank you very much! -- V.M. -- You received this message because you are subscribed to the Google Groups "Mojolicious" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/mojolicious. For more options, visit https://groups.google.com/d/optout.
