Skip to content
Snippets Groups Projects
Commit 33240ef3 authored by Jiří Kalvoda's avatar Jiří Kalvoda
Browse files

Fields.Email bude založený na html5.EmailField

parent e90e27c3
Branches
No related tags found
1 merge request!92Používání mo.web.fields
This commit is part of merge request !92. Comments created here will be created in the context of that merge request.
from typing import Optional
import wtforms
from wtforms.fields.html5 import EmailField
from wtforms.widgets.html5 import NumberInput
import mo
......@@ -20,7 +21,7 @@ class OptionalInt(wtforms.IntegerField):
raise wtforms.ValidationError('Nejedná se o číslo.')
class Email(wtforms.StringField):
class Email(EmailField):
def __init__(self, label="E-mail", validators=None, **kwargs):
super().__init__(label, validators, **kwargs)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment