John Wards
d96e2c5d79
[Validator] Adding support for Closure in CallbackValidator
...
Usage:
$formBuilder = $this->get('form.factory')
->createBuilder('form');
$formBuilder->setAttribute('validation_constraint', new Callback(array("methods"=>array(
'validate' => function ($data, $context) use ($elements) {
// logic to add violations depending on the elements
}
))));
2011-05-10 12:12:18 +01:00
Pascal Borreli
e60a68f2c6
[Validator] Fixing method_exists
...
see dea5b26c3f
2011-05-07 19:08:30 +00:00
Drew Butler
dea5b26c3f
Method exists does not work if you append the () to the method name, thus this never words for objects that actually have the __toString method. Removed the erroneous () so that this works as it appears to have been intended.
2011-05-06 13:20:29 -07:00
Eriksen Costa
164ce5210d
capitalized 'boolean'
2011-04-27 02:35:10 -03:00
Fabien Potencier
0ac679e73c
Merge remote branch 'markchalloner/master'
...
* markchalloner/master:
[Validator] Updated ContraintViolationList ArrayAccess setter to check equivalence to null instead of using is_null
Implemented ArrayAccess interface
2011-04-26 15:34:47 +02:00
Fabien Potencier
889c422d6e
Merge remote branch 'igorw/ipv6'
...
* igorw/ipv6:
[HttpFoundation] minor optimization
minor adjustments suggested by vicb
[HttpFoundation] IPv6 support for RequestMatcher
[HttpFoundation] refactor RequestMatcherTest to use dataProvider
[Validator] use full iPv6 regex
[Validator] add IPv6 support to UrlValidator
[HttpFoundation] add IPv6 support to Request
[HttpFoundation] test Request::create with an IP as host name
[HttpFoundation] refactor Request::getClientIp test
2011-04-24 22:04:25 +02:00
Pascal Borreli
8c0beea677
[Phpdoc] Cleaning/fixing
2011-04-23 15:18:47 +00:00
Igor Wiedler
51d12758a0
minor adjustments suggested by vicb
2011-04-22 18:37:20 +02:00
Bernhard Schussek
54e66c518f
[Form] Reorganized code into "form extensions"
...
The extension classes are now the only constructor argument of the FormFactory class. They replace the existing "type loader" classes.
new FormFactory(array(
new CoreExtension($validator, $storage),
new CsrfExtension($csrfProvider),
new DoctrineOrmExtension($em),
));
Together with a few upcoming commits this mechanism will make
* extension of the form framework in bundles and
* usage of the forms outside of Symfony2
much easier.
2011-04-22 17:41:21 +02:00
Igor Wiedler
e5b923a0ec
[Validator] use full iPv6 regex
...
it was taken from:
https://github.com/strattg/ipv6-address-test/blob/master/Tests/Rfc3986RegexTest.php
2011-04-22 17:07:44 +02:00
Igor Wiedler
afcdbf8b79
[Validator] add IPv6 support to UrlValidator
2011-04-22 17:07:44 +02:00
Ryan Weaver
1856601524
[Validator] Modifying Choice message and adding a different multiple message
2011-04-21 20:05:13 -05:00
Kris Wallsmith
3ff157c8a5
[Validator] switched to apc_exists()
2011-04-06 04:12:29 -07:00
Kris Wallsmith
9ff2ca7f1d
[Validator] fixed apc cache
2011-04-06 04:07:37 -07:00
Fabien Potencier
a9160eee70
[Validator] made fields the default option for Collection constraint
2011-03-31 15:36:04 +02:00
Fabien Potencier
16a98cf104
[Validator] added a Metadata factory that can be used with ValidatorInterface::validateValue()
2011-03-31 15:05:18 +02:00
Martin Hason
e21591e16e
[Validator] fixed CS
2011-03-31 14:02:00 +02:00
Fabien Potencier
07838c9612
[FrameworkBundle] removed the possibility to change the method name for validation static method loader (as it would break third-party bundles)
2011-03-30 23:21:17 +02:00
Fabien Potencier
f92055ce42
[Validator] renamed methods that do not follow CS
...
requiredOptions -> getRequiredOptions
targets -> getTargets
defaultOption -> getDefaultOption
2011-03-30 23:18:20 +02:00
Fabien Potencier
525702b5c6
[Validator] renamed method to follow CS
2011-03-30 23:10:30 +02:00
Mark Challoner
1adbb763cb
[Validator] Updated ContraintViolationList ArrayAccess setter to check equivalence to null instead of using is_null
2011-03-30 08:43:05 +01:00
Mark Challoner
77ae8b5898
Implemented ArrayAccess interface
2011-03-28 13:54:37 +01:00
Johannes M. Schmitt
7887f04dc2
removed Assert prefix from all constraints, renamed annotation namespace to assert
2011-03-26 15:26:05 +01:00
Bernhard Schussek
3e29348d21
[Validator] Added support for static callbacks to Callback constraint
2011-03-25 01:36:58 +01:00
Bernhard Schussek
9c6a6e13bf
[Validator] Renamed Execute constraint to Callback
2011-03-25 01:34:35 +01:00
Fabien Potencier
539e0e4870
Merge remote branch 'mweimerskirch/master'
2011-03-14 14:38:00 +01:00
Fabien Potencier
8c423edfef
replaced symfony-project.org by symfony.com
2011-03-06 12:40:06 +01:00
Pascal Borreli
65560b30e1
[Validator] Fixed Typo
2011-03-01 18:58:08 +01:00
Christophe Coevoet
92bfbf575c
Fixed CS
2011-02-27 20:56:29 +01:00
Michel Weimerskirch
5f0d83662c
Simplified EmailValidator using native PHP validation function.
2011-02-24 04:30:23 -08:00
Fabien Potencier
f54cedfe5e
added LICENSE files for the subtree repositories
2011-02-22 18:58:15 +01:00
Bernhard Schussek
89dbb04c63
[Validator] Made method name shorter
2011-02-16 23:05:22 +01:00
Lukas Kahwe Smith
dd71501f54
some fixes by just "blindly" trying to make phpStorm code analysis happier
2011-02-04 19:30:28 +01:00
Bernhard Schussek
1a34743990
[Validator] Fixed: Collections annotated with @Valid may contain scalar values. These values are ignored by the GraphWalker
2011-02-03 13:21:37 +01:00
Bernhard Schussek
55a97ec78e
[Validator] Made GraphWalker::validateReference() method public
2011-02-03 11:00:03 +01:00
Bernhard Schussek
5ed4d91bb8
[Validator] Implemented Execute constraint
2011-02-03 11:00:03 +01:00
Thomas
e6dc155e89
fix validator class metadata warning
2011-02-02 11:37:41 +01:00
Bernhard Schussek
0c3ca26e6e
[Validator] Implemented traversing of \Traversable objects using the @Valid constraint. Can be disabled by setting the @Valid option 'traverse' to false
2011-01-28 09:19:32 +01:00
Fabien Pennequin
c392f2518d
[Form][Validator] Fixed indentation
2011-01-26 10:36:10 +01:00
Ryan Weaver
17f9162b89
[Standards] Changing many instances of "boolean" to "Boolean".
2011-01-21 09:53:24 +01:00
Bernhard Schussek
d143eaad72
[Validator] Fixed XML schema
2011-01-19 16:50:45 +01:00
Bernhard Schussek
d327a90ff2
[Validator] Added namespace prefix support for XML and YAML loaders
2011-01-19 16:25:50 +01:00
Bernhard Schussek
2d7c47e488
[Validator] Each object is now only validated once for a given group
2011-01-19 16:25:50 +01:00
Bernhard Schussek
d52ae8e103
[Validator] Removed unused class GroupChain
2011-01-19 16:25:50 +01:00
Bernhard Schussek
eed3c9a48c
[Validator] Added abstract method Constraint::targets() to define whether constraints can be put onto properties, classes or both
2011-01-19 16:25:50 +01:00
Bernhard Schussek
6ad22fd702
[Validator] Added ValidatorFactory for programmatically creating validators
2011-01-19 16:25:50 +01:00
Dominique Bongiraud
64fb94c725
normalized license messages in PHP files
2011-01-18 08:07:46 +01:00
Ryan Weaver
11085fd6a6
[Validator] Adding a significant amount of PHPDoc to the Validator component.
2011-01-16 07:40:15 +01:00
Bernhard Schussek
39c9bf160e
[Validator] Implemented @Ip constraint
2011-01-03 22:07:15 +01:00
Bernhard Schussek
708c780213
[Validator] Renamed @Validation constraint to @Set
2011-01-03 22:06:52 +01:00