Skip to content

Commit

Permalink
fixed links in custom validation check recipe
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Sep 28, 2013
1 parent 338d852 commit 5a1b821
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions lib/Mojolicious/Guides/Rendering.pod
Expand Up @@ -690,10 +690,10 @@ L<Mojolicious::Validator/"CHECKS">.

=head2 Adding form validation checks

There are two parts to every validation check, the check itself and an
optional generator for dynamic error messages, they can be added with the
methods L<Mojolicious::Validator::Validation/"add_check"> and
L<Mojolicious::Validator::Validation/"add_error">.
There are two parts to every validation check, the check itself, returning
true or false, and an optional generator for dynamic error messages. Both look
very similar and can be registered with L<Mojolicious::Validator/"add_check">
and L<Mojolicious::Validator/"add_error">.

use Mojolicious::Lite;

Expand Down Expand Up @@ -726,11 +726,6 @@ L<Mojolicious::Validator::Validation/"add_error">.
@@ index.html.ep
<!DOCTYPE html>
<html>
<head>
%= stylesheet begin
input.field-with-error { background-color: #fd9e7e }
% end
</head>
<body>
%= form_for index => begin
% if (validation->has_error('test')) {
Expand Down

0 comments on commit 5a1b821

Please sign in to comment.