mirror of
https://github.com/miniflux/v2.git
synced 2025-06-27 16:36:00 +00:00
doc: add note regarding validateUsername
This commit is contained in:
parent
b87c547a07
commit
fc3c4873e5
1 changed files with 4 additions and 0 deletions
|
@ -153,6 +153,10 @@ func validatePassword(password string) *locale.LocalizedError {
|
||||||
|
|
||||||
// validateUsername return an error if the `username` argument contains
|
// validateUsername return an error if the `username` argument contains
|
||||||
// a character that isn't alphanumerical nor `_` and `-`.
|
// a character that isn't alphanumerical nor `_` and `-`.
|
||||||
|
//
|
||||||
|
// Note: this validation should not be applied to previously created usernames,
|
||||||
|
// and cannot be applied to Google/OIDC accounts creation because the email
|
||||||
|
// address is used for the username field.
|
||||||
func validateUsername(username string) *locale.LocalizedError {
|
func validateUsername(username string) *locale.LocalizedError {
|
||||||
if strings.ContainsFunc(username, func(r rune) bool {
|
if strings.ContainsFunc(username, func(r rune) bool {
|
||||||
if unicode.IsLetter(r) || unicode.IsNumber(r) {
|
if unicode.IsLetter(r) || unicode.IsNumber(r) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue