130 Commits

Author SHA1 Message Date
Tobias Hinz
0976fa3a79 Added listContains 2019-05-09 16:34:50 +02:00
Willem Wollebrants
c3b4dac858
Merge pull request #282 from vlucas/iss281
use correct typehint for callable, fix #281
2019-03-21 21:12:22 +01:00
Willem Wollebrants
dfde682d93 use correct typehint for callable 2019-03-21 21:00:30 +01:00
Aljosha Papsch
2dc2f29f7f Create arrayHasKeys validator. 2019-03-11 11:46:13 +01:00
misantron
ee2ed6c3b9 Change validation rule to 'subset', document and translation fixes 2018-09-23 00:53:19 +03:00
misantron
c52612f86c Tests code style fixes 2018-09-22 17:00:34 +03:00
misantron
f70e27af56 Merge remote master branch 2018-09-22 16:35:15 +03:00
Vance Lucas
14702f00d3
Merge pull request #261 from rauwebieten/master
ipv4, ipv6 and ascii rules
2018-09-11 11:59:23 -05:00
Willem Wollebrants
aaf543517d filter out non-required array parts. Fixes #262 2018-08-22 12:54:14 +02:00
peterkinamo
e5ae2c9a5f ipv4 and ipv6 rule and tests added 2018-08-03 13:02:21 +02:00
peterkinamo
971da213a3 Ascii rule added
Ascii unit test added
2018-08-03 12:28:23 +02:00
Willem Wollebrants
fcaa1d5d52 make phpdoc more specific for parameter in Validator::addInstanceRule and Validator::addRule, both need a callable 2018-06-25 22:18:19 +02:00
Willem Wollebrants
3908f086e0 fix incorrect phpdoc for callable 2018-06-25 22:15:31 +02:00
misantron
c4be38862b Validation fixes 2018-04-20 21:00:34 +03:00
Willem Wollebrants
b6589e85ea
Strict integer rule
Fixed strict integer rule and added more integer unit tests
2018-03-29 20:57:51 +02:00
misantron
48dcdc7248 Merge remote-tracking branch 'remotes/upstream/master' into validators-patch 2018-03-05 22:21:09 +03:00
Julius Ijie
4103c8bd40 Forced stopOnFirstFail parameter to bool 2018-02-23 15:59:30 +01:00
Julius Ijie
8636fed8f5 Removed boolean type declaration only available on PHP7 2018-02-23 15:55:45 +01:00
Julius Ijie
6837c9dfab Added option to stop validation when a rule is failed 2018-02-23 15:25:35 +01:00
Willem Wollebrants
013672dfce
Merge pull request #231 from piotr-cz/patch-1
Fix typo in docblock
2018-02-10 14:08:48 +01:00
Willem Wollebrants
8abb9b7220
Merge pull request #237 from mangopeaches/nested-equals-different
added nested array support for validateEquals and validateDifferent
2018-02-07 17:35:13 +01:00
Tom Breese
7c94b2ae5a added support for nested arrays in validateEquals and validateDifferent validation methods 2018-02-04 13:24:47 -05:00
Jabari
8603b2bec3 Added idn_to_ascii() with a check to make sure the function itself exists as well as a check for a required constant that it needs to function. 2018-01-05 22:28:47 -06:00
Jabari Hunt
28ef275cde Restored the original validateEmail() method. Created a new method called validateEmailDNS() that validates both the email address itself (using the ValidateEmail() method) as well as the domain name in the email address. 2018-01-01 15:11:21 -06:00
Jabari Hunt
55154359dc Fixed a typo that was introduces in an unrelated comment. 2017-12-13 16:06:31 -06:00
Jabari Hunt
255384baa8 Made the domain check an option (via third method param). 2017-12-13 14:52:24 -06:00
Jabari Hunt
ae7716c900 Improved the email validator by making sure the domain name is valid. 2017-12-13 12:30:45 -06:00
Piotr
2438da6a99
Fix typo in docblock 2017-12-08 16:00:16 +01:00
misantron
36404a83b7 Merge branch 'master' into validators-patch 2017-11-01 23:43:09 +03:00
Willem Wollebrants
9726d0f835 remove unused parameter for required rule 2017-10-30 19:44:17 +01:00
misantron
b0ddfb3a37 Merge remote-tracking branch 'origin/validators-patch' into validators-patch
# Conflicts:
#	src/Valitron/Validator.php
2017-10-26 23:11:06 +03:00
misantron
d9a466b833 Array contains and unique validators added, code style fixes 2017-10-26 23:09:45 +03:00
Dennis Meckel
eb436a382f Fixed strict integer rule and added more integer unit tests 2017-10-13 19:39:59 +02:00
Willem Wollebrants
4cc030c68a validate fields that are required, but may have empty or null values. #208 2017-08-28 21:52:21 +02:00
Juan Antonio Tubio
a80cbf0f3f Fixing code indentation 2017-07-18 16:46:38 +02:00
Juan Antonio Tubio
c6b2865ef6 Checking if mb_strpos() exists before use them 2017-07-18 16:44:05 +02:00
Juan Antonio Tubio
51575f3f9d Don't add {field} to message uf already exists
Fixed rule() function to don't add {field} to message if already exists on them
2017-07-18 16:18:00 +02:00
Willem Wollebrants
86cdecf193 Always run 'accepted' validation (#101) 2017-07-06 11:21:27 +02:00
Willem Wollebrants
ec77d601ad Handle malformed bulk rules (#204) 2017-07-06 11:03:04 +02:00
Willem Wollebrants
a6cf3a8c86 Merge pull request #201 from auroraeosrose/foreachbug
Check if the value in getParts is non-scalar to prevent "Invalid argument to foreach" error
2017-06-23 23:38:17 +02:00
Elizabeth M Smith
a7e89cf26c fix it correctly... 2017-06-23 14:41:46 -04:00
Elizabeth M Smith
e8ab4dc157 Fixes invalid argument to foreach
happens when you have a rule looking for sub items in arrays, but actually pass in a scalar value
bombs out with invalid argument to foreach
2017-06-23 14:01:34 -04:00
Elizabeth M Smith
c729a0c4ac avoids php blowing up if an array value is passed
if incoming data has an array value set with a slug rule on it, you get 
preg_match() expects parameter 2 to be string, array given
vendor\vlucas\valitron\src\Valitron\Validator.php:571
2017-06-23 13:41:39 -04:00
Willem Wollebrants
28d954817b Use an optional parameter to make validateInteger more strict 2017-02-21 21:11:14 +01:00
notona
7c990e39ef fix integer validation process 2017-02-20 12:18:18 +09:00
Acho Arnold
f698be0c95 Makes the data parameter optional in the constructor
This Fixes #184
2017-02-14 16:30:25 +01:00
Willem Wollebrants
c8895683f7 mapFieldRules 2017-02-09 20:39:17 +01:00
Marcel Prince
a09ac827c6 Add boolean rule to README & remove unnecessary ternary 2017-01-24 16:07:48 -08:00
Ivan Palamarchuk
b0c188d430 Fix incorrect IDE work 2017-01-16 16:24:57 +03:00
misantron
ccc6df8ba0 Merge branch 'master' into validators-patch
Conflicts:
	src/Valitron/Validator.php
2016-12-26 16:31:14 +03:00