Skip to content

Commit 54c2a94

Browse files
committed
Added more docs
1 parent 16a1c7d commit 54c2a94

2 files changed

Lines changed: 13 additions & 4 deletions

File tree

‎docs/index.rst‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ Installation
3333
Currently validators supports python versions 2.7 and 3.3.
3434

3535

36-
API
37-
===
36+
Basic validators
37+
================
3838

3939
Each validator in `validators` is a simple function that takes the value to validate and possibly some additional key-value arguments. Each function returns `True` when validation succeeds and ValidationFailure object when validation fails.
4040

‎validators/i18n/fi.py‎

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,13 @@ def fi_business_id(business_id):
2727
2828
::
2929
30-
>>> assert finnish_business_id('0112038-9') # Fast Monkeys Ltd
30+
>>> assert fi_business_id('0112038-9') # Fast Monkeys Ltd
3131
32-
>>> assert not finnish_business_id('1234567-8') # Bogus ID
32+
>>> assert not fi_business_id('1234567-8') # Bogus ID
3333
3434
.. versionadded:: 0.4
35+
.. versionchanged:: 0.5
36+
Method renamed from finnish_business_id to fi_business_id
3537
3638
:param business_id: business_id to validate
3739
"""
@@ -54,6 +56,13 @@ def fi_ssn(ssn):
5456
.. _django-localflavor-fi:
5557
https://github.com/django/django-localflavor-fi/
5658
59+
::
60+
61+
>>> assert fi_ssn('010101-0101')
62+
63+
>>> assert not fi_ssn('101010-0102')
64+
65+
5766
.. versionadded:: 0.5
5867
5968
:param ssn: Social Security Number to validate

0 commit comments

Comments
 (0)