<@U04UQ68083H> what is the tel format for a phone ...
# ory-copilot
s
@chilly-king-10285 what is the tel format for a phone property? Any phone I try to enter throws an error of
"<phonenumber>" is not valid "tel"
c
A message from kapa.ai
The
"tel"
format in the Ory Kratos identity schema is used for phone number validation. This validation is done using the Golang [port](https://github.com/nyaruka/phonenumbers) of Google's [libphonenumber](https://github.com/google/libphonenumber). If you're getting an error, it might be due to the phone number format not being compatible with the libphonenumber library. Make sure the phone number you're entering is in a format that the library can validate. Here's an example of how the phone number is defined in the identity schema:
Copy code
json "phone": {     "type": "string",     "format": "tel",     "<http://ory.sh/kratos|ory.sh/kratos>": {       "credentials": {         "password": {           "identifier": true         }       }     }   }
In this schema, the
"format": "tel"
field enables the validation of phone numbers. If the phone number you're entering doesn't match the expected format, you'll get an error. For more information, you can refer to the [Ory Kratos documentation](https://www.ory.sh/docs/kratos/manage-identities/customize-identity-schema#phone-number).
s
@chilly-king-10285 What is the proper format according to that library?
c
A message from kapa.ai
The proper format for phone numbers according to the libphonenumber library is the international E.164 format. The E.164 format includes the country calling code, followed by the phone number. Here is an example:
+14155552671
. In the context of the Ory Hydra API, when the
phone_number
claim is true, the phone number must be in E.164 format. If the phone number contains an extension, it should be represented using the RFC 3966 format. Here is an example:
<tel:+1(604)555-1234|+1 (604) 555-1234>;ext=5678
. For more information, you can refer to the [Ory Hydra API documentation](https://www.ory.sh/docs/hydra/reference/api).
s
@chilly-king-10285 no variation of that or any phone format works when I enter it in the Phone field on the Account Settings page.
c
A message from kapa.ai
I'm sorry to hear that you're having trouble with entering your phone number in the Account Settings page. The issue might be due to a variety of factors, including how the phone number field is configured in the identity schema, or how the validation is being handled. In the identity schema, the phone number field should be defined with
"format": "tel"
and
"type": "string"
. Here's an example:
Copy code
json "phone": {     "type": "string",     "format": "tel",     "<http://ory.sh/kratos|ory.sh/kratos>": {       "credentials": {         "password": {           "identifier": true         }       }     }   }
This configuration enables validation of phone numbers using the Golang port of Google's libphonenumber, as described in the [Ory Kratos documentation](https://www.ory.sh/docs/kratos/manage-identities/customize-identity-schema#phone-number). If the phone number field is correctly configured and you're still encountering issues, it might be helpful to check the error messages you're receiving for more specific details about what might be going wrong. If the issue persists, you might want to reach out to the Ory community or support for further assistance.
s
@chilly-king-10285 where would I find such errors for an instance of Ory Network?
c
A message from kapa.ai
New message text here