Navigation Menu

Skip to content

Commit

Permalink
small optimization
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Oct 2, 2013
1 parent dbd9149 commit 9ba4e88
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 2 additions & 0 deletions Changes
@@ -1,4 +1,6 @@

4.44 2013-10-03

4.43 2013-10-02
- Removed generators for dynamic error messages from Mojolicious::Validator.

Expand Down
2 changes: 1 addition & 1 deletion lib/Mojolicious.pm
Expand Up @@ -43,7 +43,7 @@ has types => sub { Mojolicious::Types->new };
has validator => sub { Mojolicious::Validator->new };

our $CODENAME = 'Top Hat';
our $VERSION = '4.43';
our $VERSION = '4.44';

sub AUTOLOAD {
my $self = shift;
Expand Down
3 changes: 1 addition & 2 deletions lib/Mojolicious/Validator/Validation.pm
Expand Up @@ -74,8 +74,7 @@ sub param {

sub required {
my ($self, $name) = @_;
$self->optional($name);
$self->{error}{$name} = ['required'] unless $self->is_valid;
$self->{error}{$name} = ['required'] unless $self->optional($name)->is_valid;
return $self;
}

Expand Down

0 comments on commit 9ba4e88

Please sign in to comment.