Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Replace deprecated MinLength and MaxLength validator with new Length validator. This fix also issue FriendsOfSymfony#62.
  • Loading branch information
gimler committed Aug 24, 2012
1 parent a2a5c91 commit e903e5f
Showing 1 changed file with 11 additions and 13 deletions.
24 changes: 11 additions & 13 deletions Resources/config/validation.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,23 +23,21 @@
<constraint name="NotBlank">
<option name="message">Please enter a subject</option>
</constraint>
<constraint name="MinLength">
<option name="limit">2</option>
<option name="message">The subject is too short</option>
</constraint>
<constraint name="MaxLength">
<option name="limit">255</option>
<option name="message">The subject is too long</option>
<constraint name="Length">
<option name="min">2</option>
<option name="max">255</option>
<option name="minMessage">The subject is too short|The subject is too short</option>
<option name="maxMessage">The subject is too long|The subject is too long</option>
</constraint>
</property>

<property name="body">
<constraint name="NotBlank">
<option name="message">Please enter a body</option>
</constraint>
<constraint name="MinLength">
<option name="limit">2</option>
<option name="message">The body is too short</option>
<constraint name="Length">
<option name="min">2</option>
<option name="minMessage">The body is too short|The body is too short</option>
</constraint>
</property>

Expand All @@ -53,9 +51,9 @@
<constraint name="NotBlank">
<option name="message">Please enter a body</option>
</constraint>
<constraint name="MinLength">
<option name="limit">2</option>
<option name="message">The body is too short</option>
<constraint name="Length">
<option name="min">2</option>
<option name="minMessage">The body is too short|The body is too short</option>
</constraint>
</property>

Expand Down

0 comments on commit e903e5f

Please sign in to comment.