1
0
mirror of https://github.com/moparisthebest/Yaaic synced 2024-11-25 18:32:15 -05:00

Add _ to ident chars, update comment

This commit is contained in:
Matt Mastracci 2011-04-24 20:53:40 -06:00
parent 322c4e0ac8
commit ac4fa4a104

View File

@ -413,8 +413,8 @@ public class AddServerActivity extends Activity implements OnClickListener
throw new ValidationException(getResources().getString(R.string.validation_invalid_nickname)); throw new ValidationException(getResources().getString(R.string.validation_invalid_nickname));
} }
// We currently only allow chars and numbers as ident // We currently only allow chars, numbers and some special chars for ident
Pattern identPattern = Pattern.compile("^[a-zA-Z0-9\\[\\]\\-]+$"); Pattern identPattern = Pattern.compile("^[a-zA-Z0-9\\[\\]\\-_]+$");
if (!identPattern.matcher(ident).matches()) { if (!identPattern.matcher(ident).matches()) {
throw new ValidationException(getResources().getString(R.string.validation_invalid_ident)); throw new ValidationException(getResources().getString(R.string.validation_invalid_ident));
} }