[Bug]: can't submit the add user form #598

Closed
opened 2026-02-04 20:29:54 +03:00 by OVERLORD · 6 comments
Owner

Originally created by @LiuYue616 on GitHub (Nov 4, 2024).

Where is the problem occurring?

I encountered the problem while using the application (Frontend)

What browsers are you seeing the problem on?

Microsoft Edge

Current behaviour

When I click the Add User button, all the contents in the username input box will be selected instead of submitted。
屏幕截图 2024-11-04 160347

Desired behaviour

No response

Steps to reproduce

The latest prebuilt planka I used is deployed under Windows 11, and other functions are normal。

Other information

No response

Originally created by @LiuYue616 on GitHub (Nov 4, 2024). ### Where is the problem occurring? I encountered the problem while using the application (Frontend) ### What browsers are you seeing the problem on? Microsoft Edge ### Current behaviour When I click the Add User button, all the contents in the username input box will be selected instead of submitted。 ![屏幕截图 2024-11-04 160347](https://github.com/user-attachments/assets/633376f9-78fc-4dc1-93c3-4533b3254aa4) ### Desired behaviour _No response_ ### Steps to reproduce The latest prebuilt planka I used is deployed under Windows 11, and other functions are normal。 ### Other information _No response_
Author
Owner

@meltyshev commented on GitHub (Nov 6, 2024):

Hi! Thanks for reporting this. The username validation uses the regular expression ^[a-zA-Z0-9]+((_|\.)?[a-zA-Z0-9])*$, which means usernames should contain only Latin letters and numbers, with optional _ or . symbols in between.

@meltyshev commented on GitHub (Nov 6, 2024): Hi! Thanks for reporting this. The username validation uses the regular expression `^[a-zA-Z0-9]+((_|\.)?[a-zA-Z0-9])*$`, which means usernames should contain only Latin letters and numbers, with optional `_` or `.` symbols in between.
Author
Owner

@LiuYue616 commented on GitHub (Nov 7, 2024):

Thank you for answering my stupid question,it works。

@LiuYue616 commented on GitHub (Nov 7, 2024): Thank you for answering my stupid question,it works。
Author
Owner

@meltyshev commented on GitHub (Nov 7, 2024):

Absolutely no worries! I think we need to provide some error messages, as it can sometimes be unclear why this field is being selected, what the expected value should be, and so on :)

@meltyshev commented on GitHub (Nov 7, 2024): Absolutely no worries! I think we need to provide some error messages, as it can sometimes be unclear why this field is being selected, what the expected value should be, and so on :)
Author
Owner

@obkgroove21 commented on GitHub (May 25, 2025):

Is it possible to allow mail-adress as username. Especially when you want to use keycloak, this is important:

Details:

  Could not use specified `username`.  Violated one or more validation rules:

  • Value was -4 characters longer than the configured maximum length (16)

  • Value ('mail@xxxxxxxxxxx.net') did not match the configured regular expression (/^[a-zA-Z0-9]+((_|\.)?[a-zA-Z0-9])*$/)


@meltyshev

@obkgroove21 commented on GitHub (May 25, 2025): Is it possible to allow mail-adress as username. Especially when you want to use keycloak, this is important: ``` Details: Could not use specified `username`. Violated one or more validation rules: • Value was -4 characters longer than the configured maximum length (16) • Value ('mail@xxxxxxxxxxx.net') did not match the configured regular expression (/^[a-zA-Z0-9]+((_|\.)?[a-zA-Z0-9])*$/) ``` @meltyshev
Author
Owner

@meltyshev commented on GitHub (May 25, 2025):

Is it possible to allow mail-adress as username. Especially when you want to use keycloak, this is important:

Details:

  Could not use specified `username`.  Violated one or more validation rules:

  • Value was -4 characters longer than the configured maximum length (16)

  • Value ('mail@xxxxxxxxxxx.net') did not match the configured regular expression (/^[a-zA-Z0-9]+((_|\.)?[a-zA-Z0-9])*$/)


@meltyshev

Hi! I don't think it's a good idea to store an email in both the email and username fields, especially since the username is optional and can be left blank.

Instead, you can configure the following:

  • OIDC_EMAIL_ATTRIBUTE and OIDC_USERNAME_ATTRIBUTE - to use different fields for email and username.
  • Or set OIDC_IGNORE_USERNAME=true - to skip syncing the username.

Hope this helps!

@meltyshev commented on GitHub (May 25, 2025): > Is it possible to allow mail-adress as username. Especially when you want to use keycloak, this is important: > > ``` > Details: > > Could not use specified `username`. Violated one or more validation rules: > > • Value was -4 characters longer than the configured maximum length (16) > > • Value ('mail@xxxxxxxxxxx.net') did not match the configured regular expression (/^[a-zA-Z0-9]+((_|\.)?[a-zA-Z0-9])*$/) > > > ``` > > @meltyshev Hi! I don't think it's a good idea to store an email in both the email and username fields, especially since the username is optional and can be left blank. Instead, you can configure the following: - `OIDC_EMAIL_ATTRIBUTE` and `OIDC_USERNAME_ATTRIBUTE` - to use different fields for email and username. - Or set `OIDC_IGNORE_USERNAME=true` - to skip syncing the username. Hope this helps!
Author
Owner

@obkgroove21 commented on GitHub (May 25, 2025):

Thanks a lot, it worked with:
OIDC_IGNORE_USERNAME=true - to skip syncing the username.

@obkgroove21 commented on GitHub (May 25, 2025): Thanks a lot, it worked with: OIDC_IGNORE_USERNAME=true - to skip syncing the username.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/planka#598