Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
syncEnrollments
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Yeray Santana Hualde
syncEnrollments
Commits
b93a1220
Commit
b93a1220
authored
Sep 29, 2011
by
Taylor Otwell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
commenting validation messages.
parent
3c05f726
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
29 additions
and
0 deletions
+29
-0
messages.php
laravel/validation/messages.php
+29
-0
No files found.
laravel/validation/messages.php
View file @
b93a1220
...
...
@@ -26,6 +26,11 @@ class Messages {
*
* Duplicate messages will not be added.
*
* <code>
* // Add a message to the collector for the "email" attribute
* $messages->add('email', 'The e-mail address is invalid.');
* </code>
*
* @param string $key
* @param string $message
* @return void
...
...
@@ -52,6 +57,14 @@ class Messages {
/**
* Get the first message for a given key.
*
* <code>
* // Get the first message for the e-mail attribute
* $email = $messages->first('email');
*
* // Format the first message for the e-mail attribute
* $email = $messages->first('email', '<p>:message</p>');
* </code>
*
* @param string $key
* @param string $format
* @return string
...
...
@@ -64,6 +77,14 @@ class Messages {
/**
* Get all of the messages for a key.
*
* <code>
* // Get all of the messages for the e-mail attribute
* $email = $messages->get('email');
*
* // Format all of the messages for the e-mail attribute
* $email = $messages->get('email', '<p>:message</p>');
* </code>
*
* @param string $key
* @param string $format
* @return array
...
...
@@ -78,6 +99,14 @@ class Messages {
/**
* Get all of the messages for every key.
*
* <code>
* // Get all of the messages in the collector
* $all = $messages->all();
*
* // Format all of the messages in the collector
* $all = $messages->all('<p>:message</p>');
* </code>
*
* @param string $format
* @return array
*/
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment