Advertisement
Guest User

Untitled

a guest
Mar 20th, 2019
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.96 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Web;
  5. using System.ComponentModel.DataAnnotations;
  6.  
  7. namespace zadanie5v21.Models
  8. {
  9.  
  10. public partial class User
  11. {
  12.  
  13. [Display(Name = "ID")]
  14. public int userID { get; set; }
  15.  
  16. [Required]
  17. [RegularExpression(@"[A-Za-zżźćńółęąśŻŹĆĄŚĘŁÓŃ]*", ErrorMessage ="Bez cyfr")]
  18. [StringLength(10, MinimumLength = 5)]
  19. [Display(Name = "Imię")]
  20. public string firstName { get; set; }
  21.  
  22. [Required]
  23. [RegularExpression(@"[A-Za-zżźćńółęąśŻŹĆĄŚĘŁÓŃ]*", ErrorMessage = "Bez cyfr")]
  24. [StringLength(20, MinimumLength = 4, ErrorMessage = "Minimim 4 litery, max 20")]
  25. [Display(Name = "Nazwisko")]
  26. public string lastName { get; set; }
  27.  
  28. [Required]
  29. [Range(0, 120)]
  30. [Display(Name = "Wiek")]
  31. public int age { get; set; }
  32. }
  33. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement