Fix Jubeat name entry regex to allow for spaces like the in-game name entry does.
This commit is contained in:
parent
382ad49e6f
commit
d613e7239a
@ -328,7 +328,7 @@ def updatename() -> Dict[str, Any]:
|
||||
raise Exception('Unable to find profile to update!')
|
||||
if len(name) == 0 or len(name) > 8:
|
||||
raise Exception('Invalid profile name!')
|
||||
if re.match(r'^[-&\.\*A-Z0-9]*$', name) is None:
|
||||
if re.match(r'^[ -&\.\*A-Z0-9]*$', name) is None:
|
||||
raise Exception('Invalid profile name!')
|
||||
profile.replace_str('name', name)
|
||||
g.data.local.user.put_profile(GameConstants.JUBEAT, version, user.id, profile)
|
||||
|
@ -165,7 +165,7 @@ var rivals_view = React.createClass({
|
||||
value={this.state.term}
|
||||
onChange={function(event) {
|
||||
var value = event.target.value.toUpperCase();
|
||||
var intRegex = /^[-&\\.\\*A-Z0-9]*$/;
|
||||
var intRegex = /^[ -&\\.\\*A-Z0-9]*$/;
|
||||
// Normally, names are <= 8 characters, but we allow Jubeat IDs here too
|
||||
if (value.length <= 9 && intRegex.test(value)) {
|
||||
this.setState({term: value});
|
||||
|
@ -73,7 +73,7 @@ var settings_view = React.createClass({
|
||||
value={this.state.new_name}
|
||||
onChange={function(event) {
|
||||
var value = event.target.value.toUpperCase();
|
||||
var nameRegex = /^[-&\\.\\*A-Z0-9]*$/;
|
||||
var nameRegex = /^[ -&\\.\\*A-Z0-9]*$/;
|
||||
if (value.length <= 8 && nameRegex.test(value)) {
|
||||
this.setState({new_name: value});
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user