Fakultas Ilmu Komputer UI

Skip to content
Snippets Groups Projects
Commit ed982229 authored by anthef's avatar anthef
Browse files

finish

parent da5ed277
Branches
No related tags found
No related merge requests found
......@@ -117,7 +117,6 @@ class UserForm(forms.Form):
def clean_phone_number(self):
phone = self.cleaned_data.get("phone_number", "")
# Hapus semua karakter non-digit (misal: '+' dan '-')
sanitized = re.sub(r'\D', '', phone)
if not (8 <= len(sanitized) <= 15):
raise ValidationError("Nomor HP harus terdiri dari 8 hingga 15 digit.")
......
from django.db import models
from django.contrib.auth.models import AbstractUser
# Create your models here.
class CustomUser(AbstractUser):
USERNAME_FIELD = "email"
......@@ -9,7 +9,6 @@ class CustomUser(AbstractUser):
email = models.EmailField(primary_key=True, unique=True)
name = models.CharField(max_length=255, null=False)
# password field is inherited from AbstractUser
birth_date = models.DateField(null=False)
phone_number = models.CharField(max_length=15, null=False)
blog_url = models.URLField(null=False)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment