CommentValidator.php 867 B

12345678910111213141516171819202122232425262728293031323334
  1. <?php
  2. namespace App\Repositories\Validators\Course;
  3. use \Prettus\Validator\Contracts\ValidatorInterface;
  4. use \Prettus\Validator\LaravelValidator;
  5. /**
  6. * Class CourseCommentValidator.
  7. *
  8. * @package namespace App\Repositories\Validators;
  9. */
  10. class CommentValidator extends LaravelValidator
  11. {
  12. /**
  13. * Validation Rules
  14. *
  15. * @var array
  16. */
  17. protected $rules = [
  18. ValidatorInterface::RULE_CREATE => [
  19. 'course_id' => 'required|integer',
  20. 'points' => 'required|integer',
  21. 'course_video_id' => 'required|integer',
  22. 'content' => 'required',
  23. ],
  24. ValidatorInterface::RULE_UPDATE => [
  25. 'course_id' => 'required|integer',
  26. 'points' => 'required|integer',
  27. 'course_video_id' => 'required|integer',
  28. 'content' => 'required',
  29. ],
  30. ];
  31. }