Skip to content

Instantly share code, notes, and snippets.

@MDrollette
Created June 24, 2012 20:34
Show Gist options
  • Save MDrollette/2984804 to your computer and use it in GitHub Desktop.
Save MDrollette/2984804 to your computer and use it in GitHub Desktop.
<?xml version="1.0" encoding="UTF-8" ?>
<constraint-mapping xmlns="http://symfony.com/schema/dic/constraint-mapping"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://symfony.com/schema/dic/constraint-mapping http://symfony.com/schema/dic/constraint-mapping/constraint-mapping-1.0.xsd">
<class name="SOTB\CoreBundle\Document\Torrent">
<group-sequence-provider/>
<property name="hash">
<constraint name="MaxLength">
<option name="limit">1024</option>
<option name="groups">
<value>always</value>
</option>
</constraint>
<constraint name="MinLength">
<option name="limit">32</option>
<option name="groups">
<value>hash</value>
</option>
</constraint>
</property>
</class>
</constraint-mapping>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment