mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-06-23 18:28:49 +02:00
Enforce a meaningful username format.
This commit is contained in:
parent
fc8ab93752
commit
fcd9291f7f
3 changed files with 13 additions and 0 deletions
|
@ -218,6 +218,7 @@ class User extends AttachmentContainingDBElement implements UserInterface, HasPe
|
|||
/**
|
||||
* @ORM\Column(type="string", length=180, unique=true)
|
||||
* @Assert\NotBlank
|
||||
* @Assert\Regex("/^[\w\.\+\-\$]+$/", message="user.invalid_username")
|
||||
*/
|
||||
protected $name = '';
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue