Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit ece66ec

Browse filesBrowse files
committed
Updating old annotation references to @Validation -> @Assert
1 parent 554f9b6 commit ece66ec
Copy full SHA for ece66ec

File tree

Expand file treeCollapse file tree

6 files changed

+21
-21
lines changed
Filter options
Expand file treeCollapse file tree

6 files changed

+21
-21
lines changed

‎book/forms/overview.rst

Copy file name to clipboardExpand all lines: book/forms/overview.rst
+6-6Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -212,24 +212,24 @@ data.
212212
class ContactRequest
213213
{
214214
/**
215-
* @validation:MaxLength(100)
216-
* @validation:NotBlank
215+
* @assert:MaxLength(100)
216+
* @assert:NotBlank
217217
*/
218218
protected $subject = 'Subject...';
219219
220220
/**
221-
* @validation:NotBlank
221+
* @assert:NotBlank
222222
*/
223223
protected $message;
224224
225225
/**
226-
* @validation:Email
227-
* @validation:NotBlank
226+
* @assert:Email
227+
* @assert:NotBlank
228228
*/
229229
protected $sender;
230230
231231
/**
232-
* @validation:Type("boolean")
232+
* @assert:Type("boolean")
233233
*/
234234
protected $ccmyself = false;
235235

‎reference/constraints/Choice.rst

Copy file name to clipboardExpand all lines: reference/constraints/Choice.rst
+3-3Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ constraint definition as array.
5757
class Author
5858
{
5959
/**
60-
* @validation:Choice({"male", "female"})
60+
* @assert:Choice({"male", "female"})
6161
*/
6262
protected $gender;
6363
}
@@ -126,7 +126,7 @@ constraint.
126126
class Author
127127
{
128128
/**
129-
* @validation:Choice(callback = "getGenders")
129+
* @assert:Choice(callback = "getGenders")
130130
*/
131131
protected $gender;
132132
}
@@ -164,7 +164,7 @@ you can pass the class name and the method as array.
164164
class Author
165165
{
166166
/**
167-
* @validation:Choice(callback = {"Util", "getGenders"})
167+
* @assert:Choice(callback = {"Util", "getGenders"})
168168
*/
169169
protected $gender;
170170
}

‎reference/constraints/Collection.rst

Copy file name to clipboardExpand all lines: reference/constraints/Collection.rst
+3-3Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,10 +77,10 @@ may not exist in the array.
7777
class Author
7878
{
7979
/**
80-
* @validation:Collection(
80+
* @assert:Collection(
8181
* fields = {
82-
* "firstName" = @validation:NotNull(),
83-
* "lastName" = { @validation:NotBlank(), @validation:MinLength(4) }
82+
* "firstName" = @assert:NotNull(),
83+
* "lastName" = { @assert:NotBlank(), @assert:MinLength(4) }
8484
* },
8585
* allowMissingFields = true
8686
* )

‎reference/constraints/File.rst

Copy file name to clipboardExpand all lines: reference/constraints/File.rst
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ not exceed a maximum size of 128 kilobytes and is a PDF document.
5555
class Author
5656
{
5757
/**
58-
* @validation:File(maxSize = "128k", mimeTypes = {
58+
* @assert:File(maxSize = "128k", mimeTypes = {
5959
* "application/pdf",
6060
* "application/x-pdf"
6161
* })

‎reference/constraints/True.rst

Copy file name to clipboardExpand all lines: reference/constraints/True.rst
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ Then you can constrain this method with ``True``.
6464
protected $token;
6565
6666
/**
67-
* @validation:True(message = "The token is invalid")
67+
* @assert:True(message = "The token is invalid")
6868
*/
6969
public function isTokenValid()
7070
{

‎reference/constraints/Valid.rst

Copy file name to clipboardExpand all lines: reference/constraints/Valid.rst
+7-7Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -86,13 +86,13 @@ their properties. Furthermore, ``Author`` stores an ``Address`` instance in the
8686
class Address
8787
{
8888
/**
89-
* @validation:NotBlank()
89+
* @assert:NotBlank()
9090
*/
9191
protected $street;
9292
9393
/**
94-
* @validation:NotBlank
95-
* @validation:MaxLength(5)
94+
* @assert:NotBlank
95+
* @assert:MaxLength(5)
9696
*/
9797
protected $zipCode;
9898
}
@@ -101,13 +101,13 @@ their properties. Furthermore, ``Author`` stores an ``Address`` instance in the
101101
class Author
102102
{
103103
/**
104-
* @validation:NotBlank
105-
* @validation:MinLength(4)
104+
* @assert:NotBlank
105+
* @assert:MinLength(4)
106106
*/
107107
protected $firstName;
108108
109109
/**
110-
* @validation:NotBlank
110+
* @assert:NotBlank
111111
*/
112112
protected $lastName;
113113
@@ -187,7 +187,7 @@ invalid address. To prevent that, we add the ``Valid`` constraint to the
187187
/* ... */
188188
189189
/**
190-
* @validation:Valid
190+
* @assert:Valid
191191
*/
192192
protected $address;
193193
}

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.