[Jifty-commit] r7636 - jifty/trunk/lib/Jifty
Jifty commits
jifty-commit at lists.jifty.org
Wed Nov 18 16:29:03 EST 2009
Author: alexmv
Date: Wed Nov 18 16:29:03 2009
New Revision: 7636
Modified:
jifty/trunk/lib/Jifty/Action.pm
Log:
Better "mandatory" warning using label not field name
Modified: jifty/trunk/lib/Jifty/Action.pm
==============================================================================
--- jifty/trunk/lib/Jifty/Action.pm (original)
+++ jifty/trunk/lib/Jifty/Action.pm Wed Nov 18 16:29:03 2009
@@ -943,7 +943,7 @@
# When it isn't even given, check if it's mandatory and whine about it
if ( !defined $value || !length $value ) {
if ( $field_info->{mandatory} and ($self->has_argument($field) or not defined $field_info->{default_value})) {
- return $self->validation_error( $field => _("You need to fill in the '%1' field", $field) );
+ return $self->validation_error( $field => _("You need to fill in the '%1' field", $field_info->{label} || $field) );
}
}
More information about the Jifty-commit
mailing list