Enforce a meaningful username format.

This commit is contained in:
Jan Böhmer 2020-01-08 20:57:46 +01:00
parent fc8ab93752
commit fcd9291f7f
3 changed files with 13 additions and 0 deletions

View file

@ -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 = '';