This needs to match zero or more characters because length checking is

done elsewhere and if we use this regular expression to validate text
input fields, it will refuse to allow the user to delete the last
character.


git-svn-id: https://samskivert.googlecode.com/svn/trunk@1393 6335cc39-0255-0410-8fd6-9bcaacd3b74c
This commit is contained in:
mdb
2004-01-31 13:03:39 +00:00
parent 52cdc61d55
commit 97085dec45
@@ -1,5 +1,5 @@
//
// $Id: Username.java,v 1.2 2004/01/31 06:41:47 mdb Exp $
// $Id: Username.java,v 1.3 2004/01/31 13:03:39 mdb Exp $
package com.samskivert.servlet.user;
@@ -16,7 +16,7 @@ public class Username
public static final int MAXIMUM_USERNAME_LENGTH = 12;
/** The regular expression defining valid names. */
public static final String NAME_REGEX = "^[_A-Za-z0-9]+$";
public static final String NAME_REGEX = "^[_A-Za-z0-9]*$";
/**
* Creates a username instance. Usernames must consist only of