Skip to content

Commit

Permalink
Chop ':' off from the label message
Browse files Browse the repository at this point in the history
  • Loading branch information
gastaldi committed Mar 27, 2013
1 parent e9bfe48 commit 7e858e0
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,11 @@ public static String validateRequired(final InputComponent<?, ?> input)
if (requiredMessage == null)
{
String labelValue = input.getLabel() == null ? input.getName() : input.getLabel();
// Chop : off
if (labelValue.endsWith(":"))
{
labelValue = labelValue.substring(0, labelValue.length() - 1);
}
requiredMessage = labelValue + " is required!";
}
}
Expand Down

0 comments on commit 7e858e0

Please sign in to comment.