helper.rs 986 B

12345678910111213141516171819202122232425262728293031323334353637
  1. pub(crate) fn invalid_email_test_case() -> Vec<String> {
  2. // https://gist.github.com/cjaoude/fd9910626629b53c4d25
  3. vec![
  4. "annie@",
  5. "annie@gmail@",
  6. "#@%^%#$@#$@#.com",
  7. "@example.com",
  8. "Joe Smith <[email protected]>",
  9. "email.example.com",
  10. "email@[email protected]",
  11. "[email protected]",
  12. "[email protected]",
  13. "あいうえお@example.com",
  14. /* The following email is valid according to the validate_email function return
  15. * "[email protected]",
  16. * "[email protected]",
  17. * "[email protected]",
  18. * "email@example",
  19. * "[email protected]",
  20. * "[email protected]",
  21. * "[email protected]", */
  22. ]
  23. .iter()
  24. .map(|s| s.to_string())
  25. .collect::<Vec<_>>()
  26. }
  27. pub(crate) fn invalid_password_test_case() -> Vec<String> {
  28. vec!["123456", "1234".repeat(100).as_str()]
  29. .iter()
  30. .map(|s| s.to_string())
  31. .collect::<Vec<_>>()
  32. }
  33. pub(crate) fn valid_name() -> String {
  34. "AppFlowy".to_string()
  35. }