🐛(back) allow ASCII characters in user sub field
All ASCII characters are allowed in a sub, we change the sub validator to reflect this.
This commit is contained in:
9
src/backend/core/validators.py
Normal file
9
src/backend/core/validators.py
Normal file
@@ -0,0 +1,9 @@
|
||||
"""Custom validators for the core app."""
|
||||
|
||||
from django.core.exceptions import ValidationError
|
||||
|
||||
|
||||
def sub_validator(value):
|
||||
"""Validate that the sub is ASCII only."""
|
||||
if not value.isascii():
|
||||
raise ValidationError("Enter a valid sub. This value should be ASCII only.")
|
||||
Reference in New Issue
Block a user