Guest User

Untitled

a guest
Mar 19th, 2018
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.32 KB | None | 0 0
  1. <?php
  2.  
  3. namespace App\Entity;
  4.  
  5. use Symfony\Component\Validator\Constraints as Assert;
  6.  
  7. class Contact
  8. {
  9. /**
  10. *
  11. */
  12. protected $name;
  13.  
  14. /**
  15. *
  16. * @Assert\Email(
  17. * message = "L'adresse email'{{ value }}' n'est pas une adresse valide",
  18. * checkMX = true
  19. * )
  20. */
  21. protected $email;
  22.  
  23. /**
  24. *
  25. *
  26. * @Assert\Length(
  27. * max = 50,
  28. * maxMessage = "Your subject cannot be longer than {{ limit }} characters"
  29. * )
  30. */
  31. protected $subject;
  32.  
  33. /**
  34. *
  35. * @Assert\Length(
  36. * min = 50,
  37. * minMessage = "Your message must be at least {{ limit }} characters long"
  38. * )
  39. */
  40. protected $message;
  41.  
  42. public function getName()
  43. {
  44. return $this->name;
  45. }
  46.  
  47. public function setName($name)
  48. {
  49. $this->name = $name;
  50. }
  51.  
  52. public function getEmail()
  53. {
  54. return $this->email;
  55. }
  56.  
  57. public function setEmail($email)
  58. {
  59. $this->email = $email;
  60. }
  61.  
  62. public function getSubject()
  63. {
  64. return $this->subject;
  65. }
  66.  
  67. public function setSubject($subject)
  68. {
  69. $this->subject = $subject;
  70. }
  71.  
  72. public function getmessage()
  73. {
  74. return $this->message;
  75. }
  76.  
  77. public function setmessage($message)
  78. {
  79. $this->message = $message;
  80. }
  81. }
Add Comment
Please, Sign In to add comment