src/Validation/TaskValidation.php 1 location
|
@@ 20-27 (lines=8) @@
|
| 17 |
|
* @return string |
| 18 |
|
* @throws \Exception |
| 19 |
|
*/ |
| 20 |
|
protected static function validateTaskName($name) |
| 21 |
|
{ |
| 22 |
|
if (!v::alnum()->length(2, 100)->validate($name)) { |
| 23 |
|
throw new \Exception(TaskMessage::TASK_NAME_INVALID, 400); |
| 24 |
|
} |
| 25 |
|
|
| 26 |
|
return $name; |
| 27 |
|
} |
| 28 |
|
|
| 29 |
|
/** |
| 30 |
|
* Validate and sanitize a task status. |
src/Validation/UserValidation.php 1 location
|
@@ 20-27 (lines=8) @@
|
| 17 |
|
* @return string |
| 18 |
|
* @throws \Exception |
| 19 |
|
*/ |
| 20 |
|
protected static function validateName($name) |
| 21 |
|
{ |
| 22 |
|
if (!v::alnum()->length(2, 100)->validate($name)) { |
| 23 |
|
throw new \Exception(UserMessage::USER_NAME_INVALID, 400); |
| 24 |
|
} |
| 25 |
|
|
| 26 |
|
return $name; |
| 27 |
|
} |
| 28 |
|
|
| 29 |
|
/** |
| 30 |
|
* Validate and sanitize a email address. |