learn-awesome / learn

A social network of lifelong learners built around humanity's universal learning map.
https://learnawesome.org/
Other
343 stars 40 forks source link

can't change nickname at all #227

Closed wiki-me closed 3 years ago

wiki-me commented 3 years ago

whenever i try to change the nickname (e.g. "abkjdkfjkd"), it tells me "please match the requested format" (I can't think of any reason this format is not valid), it also does not specify any requested format on the "edit profile" page.

teampolyglot commented 3 years ago

@nileshtrivedi check this.

dixonge commented 3 years ago

Same - I am not even allowed to save any changes to my profile, even if I leave the nickname set as the default (LearnAwesome###)

dixonge commented 3 years ago

Looks like this may have started right after this change was made

https://github.com/learn-awesome/learn/issues/226

nileshtrivedi commented 3 years ago

Thanks for reporting this, folks. I was very busy lately and only got around to fix this now. The error was indeed introduced in #226 where I mistakenly used forward slashes to contain the regular expression. HTML5 input's pattern attribute does not work with those slashes. See: https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/pattern