mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2026-03-11 01:39:50 +01:00
Enforce a meaningful username format.
This commit is contained in:
@@ -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 = '';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user