mdipierro
ce25d8dc31
description % should not be escaped, reverting
2019-05-25 01:01:32 -07:00
Leonel Câmara
e821e5c7a6
import translate and ValidationError as well
2019-03-13 18:40:45 +00:00
mdipierro
bfc3169239
validators moved into pydal
2019-03-04 00:26:17 -08:00
mdipierro
ca3fd90acc
new validators pass all tests
2019-03-04 00:08:13 -08:00
mdipierro
26f1b8c84b
new validators and adapted tests
2019-03-03 23:54:49 -08:00
mdipierro
e09655b112
fixed translator
2019-03-03 14:27:12 -08:00
mdipierro
5a848e51a3
Merge pull request #2107 from vinyldarkscratch/validators/is_file
...
Add new IS_FILE validator
2019-03-02 23:07:22 -08:00
Vinyl Darkscratch
1abdb0b5d8
Add new IS_FILE validator
2019-02-26 07:35:01 -08:00
Leonel Câmara
be3343e4af
backwards compatibility translator -> translate
2019-02-26 11:41:45 +00:00
mdipierro
b58b7da18f
validatos no longer depend on T
2019-02-24 01:51:18 -08:00
mdipierro
f06c60b963
space cleanup
2019-02-17 17:20:38 -08:00
mdipierro
001b77b5f3
better regex escaping
2019-02-17 16:45:45 -08:00
Seth Kinast
0077f29d71
gluon.validators: update IS_STRONG to behave as it did in web2py < 2.15
...
We used to compare `type(self.upper) == int` but the check was changed
to `isinstance(self.upper, int)`. Because bool is an instance of int but is not
the type int, the meaning of the checks changed to treat False as 0.
This patch specifically differentiates between False and 0.
- False means "no requirements for this character class".
- 0 means "exactly 0 of this character class".
Fixes #2093
2019-02-13 21:14:05 -08:00
mdipierro
ddc99b3552
validators are back in web2py for now
2019-02-10 22:15:12 -08:00
mdipierro
cf278d3741
validators now tested in pydal and code moved there
2019-02-10 21:32:31 -08:00
Vinyl Darkscratch
f434ebec8a
Update Python 3 compatibility
2019-02-09 00:01:11 -08:00
Vinyl Darkscratch
7318d28f1a
Add aspect ratio to IS_IMAGE() validator
2018-11-03 21:06:43 -08:00
mdipierro
d7624b95f8
fixed a typo in validators, thanks Paolo
2018-06-15 05:08:12 +02:00
mdipierro
c358d2a851
better validators and comments, thanks Paolo
2018-06-01 13:34:27 -05:00
mdipierro
7fce2d04af
fixed tests for IS_LIST_OF
2018-06-01 12:56:45 -05:00
mdipierro
8d865f1c5f
better error handing in IS_LIST_OF, thanks Paolo
2018-05-24 11:17:49 -05:00
Leonel Câmara
fd0f169a55
Update list of TLDs
2017-11-14 18:20:13 +00:00
tiago.bar
4a347a4f78
Enhances/fixes validators/is_empty() for Python 3 compatibility, fix #1764
2017-09-22 13:04:47 -03:00
Leonel Câmara
113df51ef9
Fixes #1685
2017-07-14 18:52:36 +01:00
mdipierro
4854b84ff9
fixed a python 3 problem, thanks kato
2017-07-10 14:54:08 -05:00
Richard Vézina
590de9c890
Enhance validators.py PEP8 and fix docstring py3 compatibility
2017-06-21 11:57:31 -04:00
Leonel Câmara
7c9653ae23
Merge branch 'master' into test_is_url_py3
2017-06-14 15:41:07 +01:00
Leonel Câmara
2a33c0faff
Changed URL validation to use urlparse instead of regex for spliting the URL
...
Enabled test_is_url in Python 3 since it is now passing
This might be one of the last fixes to #1353
Fixes #1598
2017-06-07 04:59:03 +01:00
Leonel Câmara
617ca4a98d
Fixes #1639
2017-06-05 23:52:25 +01:00
mdipierro
baa129f871
Merge pull request #1527 from leonelcamara/authapi2
...
Auth refactor
2017-05-01 09:13:18 -05:00
mdipierro
496112c4fe
Merge pull request #1604 from ilvalle/fix_1570
...
prevent is_empty from stripping whitespaces, close #1570
2017-04-28 08:07:20 -05:00
ilvalle
7a69e087f7
prevent is_empty from stripping whitespaces, close #1570
2017-04-06 20:48:12 +02:00
ilvalle
6da3a9d8fd
fix is_email with internationalized Domain Names, close #1582
2017-04-05 22:16:21 +02:00
ilvalle
637579f531
replaced ipaddr with ipaddress.py (backported from py3)
2016-12-03 08:42:35 +01:00
Leonel Câmara
02f0bdb8d3
Auth refactor, extracted many methods into a base class for more generic auth mechanisms.
...
Partially addresses #1526
Includes a solution for IS_LOWER and IS_UPPER validator problems I mentioned in #1353
2016-11-05 16:37:22 +00:00
Chris Garcia
4226b6d0e1
Corrected use of 'lowercase' and 'uppercase' to fix #1515
2016-10-28 15:23:18 -05:00
Giovanni Barillari
0528a347b3
Updated pyDAL to 16.08
2016-08-13 15:38:55 +02:00
mdipierro
35eaba1096
removed duplicated code, using pydal's _compat.py
2016-08-01 03:39:22 -05:00
ilvalle
1f013d76f3
minor few fix
2016-06-10 14:14:40 +02:00
ilvalle
fd850ab46f
fix validators, updated gluon/contrib/ipaddr
2016-06-07 19:50:49 +02:00
ilvalle
a1fd92b7f8
updated imports in tests
2016-06-02 14:28:21 +02:00
ilvalle
01bab81432
manually adapt few imports
2016-06-01 20:16:30 +02:00
ilvalle
a5599f3eab
running lib2to3.fixes.fix_idioms
2016-05-29 08:31:20 +02:00
ilvalle
d22222ebea
running lib2to3.fixes.fix_reduce
2016-05-29 08:31:19 +02:00
Leonel Câmara
a9ee9a6b58
remove simplejson
2016-05-11 00:47:23 +01:00
Giovanni Barillari
78bb8e9b26
Updated to latest pydal, fixed IS_IN_DB validator for new pydal
2016-04-19 17:24:09 +02:00
Leonel Câmara
d746d43be5
pep8 and make travis run again
2016-04-14 01:21:23 +01:00
Leonel Câmara
9a3e73031b
fixes #1266 and adds tests to make sure it doesn't happen again
2016-04-14 01:02:25 +01:00
Leonel Câmara
5c292640ba
Complete coverage for IS_IN_SET
...
Removed unreachable code in IS_IN_SET
if failures and self.theset:
if self.multiple and (value is None or value == '')
It's impossible to have *failures* and have value be None or '' at the same time
2016-03-28 14:47:58 +01:00
Leonel Câmara
5cbf381a2c
More test coverage for validators.py
...
Fixed a bug in IS_EMAIL throwing exceptions when asked to validate anything other than a string which was problematic for ANY_OF
Fixed a bug in ANY_OF.formatter where it was trying to format with a validator that didn't validate
2016-03-27 14:23:24 +01:00