Factory.php 1.2KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. <?php
  2. namespace Illuminate\Contracts\Validation;
  3. interface Factory
  4. {
  5. /**
  6. * Create a new Validator instance.
  7. *
  8. * @param array $data
  9. * @param array $rules
  10. * @param array $messages
  11. * @param array $customAttributes
  12. * @return \Illuminate\Contracts\Validation\Validator
  13. */
  14. public function make(array $data, array $rules, array $messages = [], array $customAttributes = []);
  15. /**
  16. * Register a custom validator extension.
  17. *
  18. * @param string $rule
  19. * @param \Closure|string $extension
  20. * @param string $message
  21. * @return void
  22. */
  23. public function extend($rule, $extension, $message = null);
  24. /**
  25. * Register a custom implicit validator extension.
  26. *
  27. * @param string $rule
  28. * @param \Closure|string $extension
  29. * @param string $message
  30. * @return void
  31. */
  32. public function extendImplicit($rule, $extension, $message = null);
  33. /**
  34. * Register a custom implicit validator message replacer.
  35. *
  36. * @param string $rule
  37. * @param \Closure|string $replacer
  38. * @return void
  39. */
  40. public function replacer($rule, $replacer);
  41. }