Closed kamranhossain closed 4 years ago
I make the CharField rather than Phonenumberfield. It's work now.
I make the CharField rather than Phonenumberfield. It's work now.
hey, @kamranhossain I'm having the same problem where did you change the field?
Hey, @brahimchougrani, I make CharField to a phone number in the model and add phone number validator. import the validator from phonenumber_field.validators.
from phonenumber_field.validators import validate_international_phonenumber
phone_number = models.CharField(
max_length=15, validators=[validate_international_phonenumber], unique=True
)
In django-phonenumber-field when I use graphql(django-graphene, django-graphql-jwt) for authToken mutation. It gives me this error,
"message": "Object of type PhoneNumber is not JSON serializable".
Is there any way to work it with graphql or I need to go through the custom drf serializar for this issue. Thanks.