| | 824 | Turkey (``tr``) |
| | 825 | =============== |
| | 826 | |
| | 827 | .. class:: tr.forms.TRZipCodeField |
| | 828 | |
| | 829 | A form field that validates input as a Turkish zip code. Valid codes |
| | 830 | consist of five digits. |
| | 831 | |
| | 832 | .. class:: tr.forms.TRPhoneNumberField |
| | 833 | |
| | 834 | A form field that validates input as a Turkish phone number. The correct |
| | 835 | format is 0xxx xxx xxxx. +90xxx xxx xxxx and inputs without spaces also |
| | 836 | validates. The result is corrected to xxx xxx xxxx. |
| | 837 | |
| | 838 | .. class:: tr.forms.TRIdentificationNumberField |
| | 839 | |
| | 840 | A form field that validates input as a TR identification number. A valid |
| | 841 | number must satisfy the following: |
| | 842 | |
| | 843 | * The number consist of 11 digits. |
| | 844 | * The first digit cannot be 0. |
| | 845 | * (sum(1st, 3rd, 5th, 7th, 9th)*7 - sum(2nd,4th,6th,8th)) % 10) must be |
| | 846 | equal to the 10th digit. |
| | 847 | * (sum(1st to 10th) % 10) must be equal to the 11th digit. |
| | 848 | |
| | 849 | .. class:: tr.forms.TRProvinceSelect |
| | 850 | |
| | 851 | A ``select`` widget that uses a list of Turkish provinces as its choices. |
| | 852 | |