
from wtforms import DateField, StringField
from wtforms.validators import InputRequired, Length, Optional

from ....util.l10n import LocalizedForm


class DetailsForm(LocalizedForm):
    first_names = StringField('Vorname(n)', [InputRequired(), Length(min=2)])
    last_name = StringField('Nachname', [InputRequired(), Length(min=2, max=80)])
    date_of_birth = DateField('Geburtsdatum',
                              [Optional()],
                              format='%d.%m.%Y')
    country = StringField('Land', [Optional(), Length(max=60)])
    zip_code = StringField('PLZ', [Optional()])
    city = StringField('Stadt', [Optional()])
    street = StringField('Straße', [Optional()])
    phone_number = StringField('Telefonnummer', [Optional(), Length(max=20)])


from wtforms import DateField, StringField
from wtforms.fields.html5 import TelField
from wtforms.validators import InputRequired, Length, Optional

from ....util.l10n import LocalizedForm


class DetailsForm(LocalizedForm):
    first_names = StringField('Vorname(n)', [InputRequired(), Length(min=2)])
    last_name = StringField('Nachname', [InputRequired(), Length(min=2, max=80)])
    date_of_birth = DateField('Geburtsdatum',
                              [Optional()],
                              format='%d.%m.%Y')
    country = StringField('Land', [Optional(), Length(max=60)])
    zip_code = StringField('PLZ', [Optional()])
    city = StringField('Stadt', [Optional()])
    street = StringField('Straße', [Optional()])
    phone_number = TelField('Telefonnummer', [Optional(), Length(max=20)])

Use `<input type="tel">` for phone number field
Use `<input type="tel">` for phone number field

  
  from wtforms import DateField, StringField
+ from wtforms.fields.html5 import TelField
  from wtforms.validators import InputRequired, Length, Optional
  
  from ....util.l10n import LocalizedForm
  
  
  class DetailsForm(LocalizedForm):
      first_names = StringField('Vorname(n)', [InputRequired(), Length(min=2)])
      last_name = StringField('Nachname', [InputRequired(), Length(min=2, max=80)])
      date_of_birth = DateField('Geburtsdatum',
                                [Optional()],
                                format='%d.%m.%Y')
      country = StringField('Land', [Optional(), Length(max=60)])
      zip_code = StringField('PLZ', [Optional()])
      city = StringField('Stadt', [Optional()])
      street = StringField('Straße', [Optional()])
-     phone_number = StringField('Telefonnummer', [Optional(), Length(max=20)])
+     phone_number = TelField('Telefonnummer', [Optional(), Length(max=20)])
  
Use `<input type="tel">` for phone number field
## Code Before:

from wtforms import DateField, StringField
from wtforms.validators import InputRequired, Length, Optional

from ....util.l10n import LocalizedForm


class DetailsForm(LocalizedForm):
    first_names = StringField('Vorname(n)', [InputRequired(), Length(min=2)])
    last_name = StringField('Nachname', [InputRequired(), Length(min=2, max=80)])
    date_of_birth = DateField('Geburtsdatum',
                              [Optional()],
                              format='%d.%m.%Y')
    country = StringField('Land', [Optional(), Length(max=60)])
    zip_code = StringField('PLZ', [Optional()])
    city = StringField('Stadt', [Optional()])
    street = StringField('Straße', [Optional()])
    phone_number = StringField('Telefonnummer', [Optional(), Length(max=20)])

## Instruction:
Use `<input type="tel">` for phone number field
## Code After:

from wtforms import DateField, StringField
from wtforms.fields.html5 import TelField
from wtforms.validators import InputRequired, Length, Optional

from ....util.l10n import LocalizedForm


class DetailsForm(LocalizedForm):
    first_names = StringField('Vorname(n)', [InputRequired(), Length(min=2)])
    last_name = StringField('Nachname', [InputRequired(), Length(min=2, max=80)])
    date_of_birth = DateField('Geburtsdatum',
                              [Optional()],
                              format='%d.%m.%Y')
    country = StringField('Land', [Optional(), Length(max=60)])
    zip_code = StringField('PLZ', [Optional()])
    city = StringField('Stadt', [Optional()])
    street = StringField('Straße', [Optional()])
    phone_number = TelField('Telefonnummer', [Optional(), Length(max=20)])
