-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added constraint to signup form - No whitespace in username (#519)
* Added constraint to username so that no whitespaces can be in the username. Django handles trailing and leading whitespaces it selfs, so that '-test10' all leadingwhite spaces is ingored by django when inserted. The same with 'test10-' all trailing is also ingored * fixup! Added constraint to username so that no whitespaces can be in the username. Django handles trailing and leading whitespaces it selfs, so that '-test10' all leadingwhite spaces is ingored by django when inserted. The same with 'test10-' all trailing is also ingored * Update comment --------- Co-authored-by: Christoffer Trebbien Jønsson <[email protected]> Co-authored-by: Kresten Laust <[email protected]>
- Loading branch information
1 parent
958fa45
commit fccc11d
Showing
3 changed files
with
27 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# Generated by Django 4.1.13 on 2024-10-24 19:07 | ||
|
||
import django.core.validators | ||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('stregsystem', '0019_theme'), | ||
] | ||
|
||
operations = [ | ||
migrations.AlterField( | ||
model_name='member', | ||
name='username', | ||
field=models.CharField(max_length=16, validators=[django.core.validators.RegexValidator(code='invalid_username', regex='^\\S+$')]), | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters