Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
D
django
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
django
Commits
2a4492ae
Kaydet (Commit)
2a4492ae
authored
Agu 13, 2014
tarafından
areski
Kaydeden (comit)
Tim Graham
Agu 14, 2014
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Fixed #23224 - Documented EmailValidator.
üst
bef5b9b7
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
32 additions
and
3 deletions
+32
-3
fields.txt
docs/ref/models/fields.txt
+2
-1
validators.txt
docs/ref/validators.txt
+30
-2
No files found.
docs/ref/models/fields.txt
Dosyayı görüntüle @
2a4492ae
...
...
@@ -544,7 +544,8 @@ The default form widget for this field is a :class:`~django.forms.TextInput`.
.. class:: EmailField([max_length=254, **options])
A :class:`CharField` that checks that the value is a valid email address.
A :class:`CharField` that checks that the value is a valid email address. It
uses :class:`~django.core.validators.EmailValidator` to validate the input.
.. versionchanged:: 1.8
...
...
docs/ref/validators.txt
Dosyayı görüntüle @
2a4492ae
...
...
@@ -105,6 +105,35 @@ to, or in lieu of custom ``field.clean()`` methods.
:exc:`TypeError` is raised.
Defaults to `0`.
``EmailValidator``
------------------
.. class:: EmailValidator([message=None, code=None, whitelist=None])
:param message: If not ``None``, overrides :attr:`.message`.
:param code: If not ``None``, overrides :attr:`code`.
:param whitelist: If not ``None``, overrides :attr:`whitelist`.
.. attribute:: message
The error message used by
:exc:`~django.core.exceptions.ValidationError` if validation fails.
Defaults to ``"Enter a valid email address"``.
.. attribute:: code
The error code used by :exc:`~django.core.exceptions.ValidationError`
if validation fails. Defaults to ``"invalid"``.
.. attribute:: whitelist
Whitelist of email domains to allow. By default, a regular expression
(the ``domain_regex`` attribute) is used to validate whatever appears
after the @ sign. However, if that string appears in the whitelist, this
validation is bypassed. If not provided, the default whitelist is
``['localhost']``. Other domains that don't contain a dot won't pass
validation, so you'd need to whitelist them as necessary.
``URLValidator``
----------------
.. class:: URLValidator([schemes=None, regex=None, message=None, code=None])
...
...
@@ -130,8 +159,7 @@ to, or in lieu of custom ``field.clean()`` methods.
------------------
.. data:: validate_email
An ``EmailValidator`` instance that ensures a value looks like an
email address.
An :class:`EmailValidator` instance without any customizations.
``validate_slug``
-----------------
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment