Jonathan Stewmon
8851fb5abc
Always display message for AbstractRelated
rule
...
`NestedValidationException` should include all `AbstractRelated` rule
exceptions.
`AbstractRelated` rule failures always indicate an interesting nested
context, which should not be omitted from the final result.
`NonOmissibleExceptionInterface` is a marker interface for
exceptions thrown by instances of `AbstractRelated`, which
facilitates identification of those rules' exceptions with
`instanceof`.
2017-03-27 10:21:45 +02:00
Henrique Moody
2b8c560db4
Merge branch '1.1'
2017-03-14 10:46:47 +01:00
Henrique Moody
5ab87d1dd9
Merge branch '1.0' into 1.1
2017-03-14 10:44:11 +01:00
Henrique Moody
dc869ac375
Only return "name" as is if it's a string
2017-03-14 10:28:03 +01:00
Henrique Moody
b43c9b103b
Better message for Length rule
...
Update exception message when minimum value and maximum value are the
same.
2017-02-12 18:18:39 +01:00
Bogus
bb5ad2d988
Replaced TLDs with current list from IANA
2017-02-08 09:22:25 +01:00
Henrique Moody
86623fc3ca
SimpleXMLElement can also be used as an array
2017-02-05 15:03:48 +01:00
Bradyn Poulsen
d48b55a092
Create "OneOf" rule
2017-02-05 14:49:07 +01:00
Henrique Moody
7ee4ae47d5
Rename "OneOf" to "AnyOf"
2017-02-05 12:28:08 +01:00
Henrique Moody
27d35987be
Create "StringVal" rule
2017-02-04 15:16:00 +01:00
Henrique Moody
25bffa00e2
Merge branch '1.1'
2017-01-26 15:41:19 +01:00
Henrique Moody
03f4abbd08
Merge branch '1.0' into 1.1
2017-01-26 15:39:48 +01:00
Yosmany Garcia
8eb95c2b04
Updated provinces of Cuba
...
Updated provinces of Cuba according to the change of 2011
2017-01-26 15:38:38 +01:00
Michał Prochowski
fa61315079
Czech and slovakia postal code patterns fix.
2017-01-26 15:37:37 +01:00
Renato Moura
e4ae02fe94
Fix "Cnpj" rule
2017-01-25 17:41:21 +01:00
Yosmany Garcia
32414451b0
Updated provinces of Cuba
...
Updated provinces of Cuba according to the change of 2011
2017-01-25 17:36:24 +01:00
Bartłomiej Krukowski
c9b78789a7
Invalid doc comment
2017-01-23 12:42:47 +01:00
Andy Snell
94a79c033a
Update MasterCard BIN Range
...
Updates the CreditCard validator regex for the MasterCard brand to match 16-digit card numbers starting with 22 - 27. Additionally, updates the unit test for CreditCard with a published test card in the new BIN range.
Additional information on the BIN range update can be found at: https://www.mastercard.us/en-us/issuers/get-support/2-series-bin-expansion.html
2016-12-04 23:56:43 -05:00
Henrique Moody
e708edd005
Rename rule "Numeric" to "NumericVal"
2016-11-06 18:45:44 +01:00
Henrique Moody
07a120d058
Upgrade "symfony/validator" version
2016-11-05 14:14:39 +01:00
Henrique Moody
6f5c623926
Use class
constant instead of FQCN
2016-10-30 20:16:13 +01:00
Henrique Moody
f34a34c0b2
Always use mbstring functions
2016-10-30 10:45:30 +01:00
Henrique Moody
4d72af312f
Update PHP-CS-Fixer settings
2016-10-30 10:39:23 +01:00
Henrique Moody
f2bb77bb8e
Create tests for "egulias/email-validator" ~2.1
2016-10-29 15:37:09 +02:00
Henrique Moody
c65e1e37f9
Merge branch '1.1'
2016-10-29 15:30:23 +02:00
Henrique Moody
710e807a68
Merge branch '1.0' into 1.1
2016-10-29 15:29:17 +02:00
Henrique Moody
f82fcf0762
Prevent "Regex" to process non-string inputs
2016-10-29 15:21:14 +02:00
Henrique Moody
bd636cc75e
Add support for "egulias/email-validator" 2.x
2016-10-29 15:20:13 +02:00
Julián Gutiérrez
195a8fe534
Create "Nif" rule
...
Rule to validate spanish NIF (DNI/NIE/CIF).
2016-10-09 17:50:52 +02:00
Henrique Moody
08ea9b7925
Merge branch '1.1'
2016-09-20 08:45:34 +02:00
Henrique Moody
e457f19dbd
Merge branch '1.0' into 1.1
2016-09-20 08:44:39 +02:00
Henrique Moody
98050476c6
Always return a valid exception
...
If calling the method `getExceptionForPath()` when the exception was
nested but had no child it was returning null. This commit ensures that
it always return a valid exception.
2016-09-19 18:22:39 +02:00
Henrique Moody
6ee9776ea9
Merge branch '1.1'
2016-09-19 11:25:42 +02:00
Henrique Moody
3fa5bc0489
Merge branch '1.0' into 1.1
2016-09-19 11:24:33 +02:00
Emmerson
d0a98ae5d3
Date rule accepting scalar and DateTimeInterface
2016-09-19 10:13:01 +02:00
Tomasz Regdos
38aedd01e3
Create "Vatin" rule (VAT identification number)
...
See https://en.wikipedia.org/wiki/VAT_identification_number
2016-09-19 09:50:50 +02:00
Henrique Moody
332b0d7bb6
Merge branch '1.1'
2016-09-19 09:33:16 +02:00
Henrique Moody
c79d8fdf4f
Change file mode of "Image" rule
2016-09-19 09:32:42 +02:00
Gabriel Pedro
a772d7f89a
Replace CNH validation algorithm
...
The old algorithm not working with some CNH values, e.g 00641829409.
You can even do some checking on
http://www.detran.pr.gov.br/modules/catasg/servicos-detalhes.php?tema=motorista&id=239 .
Original algo can be found on
http://forum.imasters.com.br/topic/400293-validate-br .
2016-09-18 13:25:18 +02:00
Henrique Moody
4eb6d8090f
Merge branch '1.1'
2016-09-17 21:39:18 +02:00
Henrique Moody
edf4e49ac6
Merge branch '1.0' into 1.1
2016-09-17 21:30:00 +02:00
Henrique Moody
4bcc4027f8
Try to use the getRelatedByName()
method first
...
Then using the `findMessages()` method, tries to use the method
`getRelatedByName()` before using the `findRelated()` method.
This change was made because since on `KeyNested` rule you may have
names with '.' we'll never get the proper exception using
`findRelated()`.
2016-09-17 21:11:55 +02:00
Henrique Moody
98443bad0c
Get the proper exception when using findMessage()
2016-09-17 21:04:24 +02:00
Henrique Moody
494b67871f
Fix wrong behaviour on AbstractRelated
...
When you define the name for an `AbstractRelated` instance, you expect
that it also define the name for its child. But, when the child already
had a name the `AbstractRelated` was overwriting its name with the
`reference`.
2016-09-17 20:23:38 +02:00
Henrique Moody
d716214258
Merge branch '1.1'
2016-09-13 11:33:55 +02:00
Henrique Moody
6d0e3a2422
Merge branch '1.0' into 1.1
2016-09-13 11:32:43 +02:00
Henrique Moody
7e88a7a0c8
Always check the type then executing KeyNested
2016-09-12 18:06:10 +02:00
Richard
8dd8032b0d
AbstractComposite constructor has better practice
2016-08-04 09:12:09 +02:00
Henrique Moody
fb471f9667
Remove deprecated "Iterable" rule
2016-08-03 11:08:22 +02:00
Henrique Moody
53b737513b
Merge branch '1.0' into 1.1
2016-08-03 11:06:53 +02:00