Symfony2 get validation constraints on an entity
问题 Im working on a method to get all validation constraints of an entity (what i am trying to achieve is to return this data in JSON and apply the same constraints on client side using JQuery Validation Plugin), however im having some trouble getting the constraints, Here is my current code: $metadata = new \Symfony\Component\Validator\Mapping\ClassMetadata("Namespace\JobBundle\Entity\Job"); $annotationloader = new AnnotationLoader(new AnnotationReader()); $annotationloader->loadClassMetadata(