label = label.substring(0, label.length() - 1);
String s = (String)uiInput.getValue();
if (Character.isDigit(s.charAt(0)) || s.charAt(0) == '-' || s.charAt(0) == '.' || s.charAt(0) == '_')
{
Object[] args = {label, uiInput.getBindingField()};
throw new MessageException(new ApplicationMessage("FirstCharacterNameValidator.msg", args,
ApplicationMessage.WARNING));
}
for (int i = 0; i < s.length(); i++)
{
char c = s.charAt(i);
if (Character.isLetter(c) || Character.isDigit(c) || c == '_' || c == '-' || c == '.')
{
continue;
}
Object[] args = {label, uiInput.getBindingField()};
throw new MessageException(new ApplicationMessage("ResourceValidator.msg.Invalid-char", args,
ApplicationMessage.WARNING));
}
}