silexlabs / Silex

Silex live web creation, free/libre no-code website builder, next gen Webflow for the static web
http://www.silex.me
GNU Affero General Public License v3.0
2.24k stars 578 forks source link

Validation Class bug? #170

Closed Ektajain closed 10 years ago

Ektajain commented 10 years ago

For some reason composer was giving me v2.5 of Validator, despite me requiring v2.3...

error-code

This error only occurs when validating Length. I have tested several other constraints, such as NotBlank and Email, which are fine.

Line code used for adding constraint: $metadata->addPropertyConstraint('testField', new Assert\Length(array('max' => 2)));

This is from my composer.json:

"require": {
    "silex/silex": "~1.2",
    "twig/twig": ">=1.8,<2.0-dev",
    "symfony/twig-bridge": "~2.3",
    "cartalyst/sentry": "2.0.*",
    "illuminate/database": "4.0.*",
    "ircmaxell/password-compat": "1.0.*",
    "filp/whoops": "1.*",
    "symfony/form": "~2.3",
    "symfony/validator": "~2.3",
    "symfony/config": "~2.3",
    "symfony/translation": "~2.3",
    "symfony/locale": "~2.3",
    "symfony/security-csrf": "~2.4",
    "symfony/twig-bridge": "~2.3"
}
lexoyo commented 10 years ago

Wrong Silex, sorry. here this is about silex free website builder not the PHP framework