1234567891011121314151617181920212223242526272829303132 |
- <?php
- namespace App\Repositories\Validators\Note;
- use \Prettus\Validator\Contracts\ValidatorInterface;
- use \Prettus\Validator\LaravelValidator;
- /**
- * Class CommentValidator.
- *
- * @package namespace App\Repositories\Validators\Note;
- */
- class CommentValidator extends LaravelValidator
- {
- /**
- * Validation Rules
- *
- * @var array
- */
- protected $rules = [
- ValidatorInterface::RULE_CREATE => [
- 'body' => 'required',
- 'note_id' => 'required|integer',
- 'parent_id' => 'nullable|integer'
- ],
- ValidatorInterface::RULE_UPDATE => [
- 'body' => 'required',
- 'note_id' => 'required|integer',
- 'parent_id' => 'nullable|integer'
- ],
- ];
- }
|