AuthForget.php 850 B

123456789101112131415161718192021222324252627282930313233
  1. <?php
  2. namespace App\Http\Requests\Passport;
  3. use Illuminate\Foundation\Http\FormRequest;
  4. class AuthForget extends FormRequest
  5. {
  6. /**
  7. * Get the validation rules that apply to the request.
  8. *
  9. * @return array
  10. */
  11. public function rules()
  12. {
  13. return [
  14. 'email' => 'required|email',
  15. 'password' => 'required|min:8',
  16. 'email_code' => 'required'
  17. ];
  18. }
  19. public function messages()
  20. {
  21. return [
  22. 'email.required' => __('Email can not be empty'),
  23. 'email.email' => __('Email format is incorrect'),
  24. 'password.required' => __('Password can not be empty'),
  25. 'password.min' => __('Password must be greater than 8 digits'),
  26. 'email_code.required' => __('Email verification code cannot be empty')
  27. ];
  28. }
  29. }