1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

Validate new user username

Show a descriptive message when the username input doesn't match a modified version of the regex used by the backend
This commit is contained in:
SHestres 2024-12-18 08:15:43 +00:00
parent a88349f8d3
commit 918399e0ca
3 changed files with 23 additions and 3 deletions

View file

@ -205,6 +205,7 @@ const UserNew = () => {
type='text'
id='txtUsername'
label='LabelName'
validator={{ pattern: '^([\\w \\-\'._@+]*)([\\w\\-\'._@+])([\\w \\-\'._@+]*)$', errMessage: 'Username must not be empty and contain only numbers, letters, spaces, or the following symbols -\'._@+' }}
options={'required'}
/>
</div>