1
0
mirror of synced 2025-02-20 20:50:59 +01:00

Fix Jubeat name entry regex to allow for spaces like the in-game name entry does.

This commit is contained in:
Jennifer Taylor 2020-05-08 22:41:24 +00:00
parent 382ad49e6f
commit d613e7239a
3 changed files with 3 additions and 3 deletions

View File

@ -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)

View File

@ -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});

View File

@ -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});
}